feat: sync deployed v1.0.0-rc.38-custom.42
Sync production source including routing, billing, Astra detection and public uptime. Update custom build instructions and license packaging.
This commit is contained in:
1 parent
aa6c3f50f4
commit
ceddfd3d6b
828 files changed
+122253
-13702
No files matched your search
+17
-1
@@ -284,10 +284,26 @@ func runSystemTaskScheduler() {
|
||||
if latest.Status == model.SystemTaskStatusPending || latest.Status == model.SystemTaskStatusRunning {
|
||||
continue // an active row already exists
|
||||
}
|
||||
if now-latest.UpdatedAt < int64(scheduled.Interval().Seconds()) {
|
||||
anchor := latest.UpdatedAt
|
||||
if anchored, ok := scheduled.(interface{ ScheduleFromCreation() bool }); ok && anchored.ScheduleFromCreation() {
|
||||
anchor = latest.CreatedAt
|
||||
}
|
||||
if now-anchor < int64(scheduled.Interval().Seconds()) {
|
||||
continue // not due yet
|
||||
}
|
||||
}
|
||||
if gated, ok := scheduled.(interface {
|
||||
ScheduleDue(context.Context, time.Time) (bool, error)
|
||||
}); ok {
|
||||
due, err := gated.ScheduleDue(context.Background(), time.Unix(now, 0))
|
||||
if err != nil {
|
||||
logger.LogWarn(context.Background(), fmt.Sprintf("system task due lookup failed: type=%s err=%v", scheduled.Type(), err))
|
||||
continue
|
||||
}
|
||||
if !due {
|
||||
continue
|
||||
}
|
||||
}
|
||||
if _, err := model.CreateSystemTask(scheduled.Type(), scheduled.NewPayload(), nil); err != nil {
|
||||
activeTask, activeErr := model.GetActiveSystemTask(scheduled.Type())
|
||||
if activeErr == nil && activeTask != nil {
|
||||
|
||||
Reference in new issue
Block a user