测试
This commit is contained in:
@@ -38,7 +38,7 @@ def push_data_to_dtc_task(self):
|
|||||||
# 获取分布式锁,使用任务名称作为锁标识
|
# 获取分布式锁,使用任务名称作为锁标识
|
||||||
connection_success = redis_manager.connect()
|
connection_success = redis_manager.connect()
|
||||||
if not connection_success:
|
if not connection_success:
|
||||||
logger.error(f"❌ Redis管理器连接失败,任务停止执行111")
|
logger.error(f"❌ Redis管理器连接失败,任务停止执行")
|
||||||
raise Exception("Redis连接失败")
|
raise Exception("Redis连接失败")
|
||||||
|
|
||||||
lock = redis_manager.create_lock(f"celery_task:{task_name}", timeout=300) # 5分钟超时
|
lock = redis_manager.create_lock(f"celery_task:{task_name}", timeout=300) # 5分钟超时
|
||||||
|
|||||||
Reference in New Issue
Block a user