import time
from celery_app2 import celery_app2
from pymongo import MongoClient
uri="mongodb://owner:Pheecian1@47.101.198.30:27017/baojia"
mongoclient=MongoClient(uri)
db = mongoclient['baojia']
dbcollection=db['Dwgc']
from redis.exceptions import TimeoutError
@celery_app2.task(autoretry_for=(TimeoutError,))
def process_data(data:dict)-> dict:
    print(data['name'])
    print(data['detail'])##dwgcbh
    result = dbcollection.update_one({'biao_id': data['name'], 'Dwgcbh': data['detail']}, {'$set': {'status': '开始'}})
    print(result)
    return {"result": []}
