feat: enhance schedule publish account handling and caching mechanisms
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user