feat: 资金冻结 P1 打手结单收口网关 + 到期解冻定时任务骨架

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
XingQue
2026-07-26 18:49:44 +08:00
parent d40a27a5ca
commit 6a1895e566
9 changed files with 352 additions and 98 deletions

View File

@@ -17,7 +17,7 @@ app.config_from_object('django.conf:settings', namespace='CELERY')
# 自动发现所有已注册app中的tasks.py文件
#app.autodiscover_tasks()
# 自动发现任务(不含 orders.tasks订单超时自动结算已永久关闭
app.autodiscover_tasks(['users.tasks', 'users.ranking_tasks', 'config.tasks'])
app.autodiscover_tasks(['users.tasks', 'users.ranking_tasks', 'config.tasks', 'jituan.tasks'])
# 配置周期性任务Celery Beat Schedule
app.conf.beat_schedule = {
@@ -84,7 +84,17 @@ app.conf.beat_schedule = {
},
'args': (),
'kwargs': {}
}
},
# 5. 资金冻结到期解冻(默认无冻结单时几乎空跑)
'scan_fund_freeze_due': {
'task': 'jituan.tasks.scan_fund_freeze_due',
'schedule': crontab(minute='*/15'),
'options': {
'queue': 'periodic_tasks',
'priority': 4,
},
},
}
@@ -97,6 +107,7 @@ app.conf.task_routes = {
# 'orders.tasks.*': {'queue': 'order_tasks'},
'users.tasks.*': {'queue': 'periodic_tasks'},
'config.tasks.*': {'queue': 'periodic_tasks'},
'jituan.tasks.*': {'queue': 'periodic_tasks'},
}
# 任务序列化