feat: enhance schedule publish account handling and caching mechanisms
Frontend CI / Frontend (push) Successful in 3m1s
Backend CI / Backend (push) Failing after 6m51s

This commit is contained in:
2026-06-21 09:11:37 +08:00
parent c1b06dab18
commit 37d75597f9
6 changed files with 125 additions and 54 deletions
@@ -469,6 +469,17 @@ func (w *ScheduleDispatchWorker) claimDueSchedules(ctx context.Context, runtimeC
}
task.PublishAccountIDs = decodeDueSchedulePublishAccountIDs(publishAccountIDsJSON)
task.PublishEnterpriseSiteTargets = tenantapp.DecodeScheduleEnterpriseSiteTargets(publishEnterpriseSiteTargetsJSON)
if task.AutoPublish && len(task.PublishAccountIDs) > 0 {
accountIDs, _, err := tenantapp.LoadExistingSchedulePublishAccountIDsAndPlatformsByIDs(ctx, tx, task.TenantID, task.WorkspaceID, task.PublishAccountIDs)
if err != nil {
rows.Close()
return nil, err
}
task.PublishAccountIDs = accountIDs
}
if task.AutoPublish && len(task.PublishAccountIDs) == 0 && len(task.PublishEnterpriseSiteTargets) == 0 {
task.AutoPublish = false
}
task.CoverRandomFolderID = int64PtrFromInt8(coverRandomFolderID)
if task.CoverMode == "" {
task.CoverMode = tenantapp.ScheduleCoverModeSpecific