fix: stabilize cron scheduling and run history
This commit is contained in:
@@ -35,10 +35,10 @@ from common.db.models import (
|
||||
from common.eventing import add_outbox_event, schedule_event_type, utcnow
|
||||
from common.ids import new_ulid
|
||||
|
||||
# A stable user_id used for cron-triggered runs. The corresponding
|
||||
# ``Users`` row is seeded by the auth-bootstrap migration so any audit
|
||||
# query joining on ``ScheduleRuns.triggered_by`` still resolves.
|
||||
SYSTEM_CRON_USER_ID = "01HZZZZZZZZZZZZZZZZZZZZZZCR"
|
||||
# Cron 运行需要一个可审计的 ``triggered_by``。这里使用基线迁移已经创建的
|
||||
# 管理员用户;该值必须是 26 个字符,才能写入 ``ScheduleRuns.triggered_by``
|
||||
# 的 ``CHAR(26)`` 字段。
|
||||
SYSTEM_CRON_USER_ID = "00000000000000000000000001"
|
||||
|
||||
|
||||
TriggerType = Literal["manual", "cron", "api"]
|
||||
|
||||
Reference in New Issue
Block a user