perf(douyu): 拆分任务槽并改造绑定扫码调度
This commit is contained in:
@@ -101,6 +101,10 @@ async def lifespan(app: FastAPI):
|
||||
|
||||
register_default_jobs()
|
||||
start_scheduler()
|
||||
from .services.binding_poll_scheduler import (
|
||||
start_binding_poll_scheduler,
|
||||
stop_binding_poll_scheduler,
|
||||
)
|
||||
from .services.integration import (
|
||||
start_integration_outbox_worker,
|
||||
stop_integration_outbox_worker,
|
||||
@@ -113,17 +117,21 @@ async def lifespan(app: FastAPI):
|
||||
start_platform_fulfillment_reconciler,
|
||||
stop_platform_fulfillment_reconciler,
|
||||
)
|
||||
from .services.task_runtime import shutdown as shutdown_task_runtime
|
||||
|
||||
start_integration_outbox_worker()
|
||||
start_platform_fulfillment_reconciler()
|
||||
start_platform_fulfillment_auto_allocator()
|
||||
start_binding_poll_scheduler()
|
||||
try:
|
||||
yield
|
||||
finally:
|
||||
stop_binding_poll_scheduler()
|
||||
stop_platform_fulfillment_auto_allocator()
|
||||
stop_platform_fulfillment_reconciler()
|
||||
stop_integration_outbox_worker()
|
||||
stop_scheduler()
|
||||
shutdown_task_runtime(wait=False)
|
||||
|
||||
|
||||
app = FastAPI(
|
||||
|
||||
Reference in New Issue
Block a user