From 991c7845d5f90f20295b8002e9d6f2dd771de811 Mon Sep 17 00:00:00 2001 From: tong3jie <14191774+tong3jie@users.noreply.github.com> Date: Wed, 11 Mar 2026 18:07:01 +0800 Subject: [PATCH] fix(cron): update file permission mode to use octal notation in test and fix some lint errors --- pkg/cron/service.go | 2 -- pkg/cron/service_test.go | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/cron/service.go b/pkg/cron/service.go index 55dd742a4..d38009306 100644 --- a/pkg/cron/service.go +++ b/pkg/cron/service.go @@ -300,7 +300,6 @@ func (cs *CronService) executeJobByID(jobID string) { func (cs *CronService) computeNextRun(schedule *CronSchedule, nowMS int64) *int64 { switch schedule.Kind { - case "at": if schedule.AtMS != nil && *schedule.AtMS > nowMS { return schedule.AtMS @@ -331,7 +330,6 @@ func (cs *CronService) computeNextRun(schedule *CronSchedule, nowMS int64) *int6 log.Printf("[cron] unknown schedule kind '%s'", schedule.Kind) return nil } - } func (cs *CronService) recomputeNextRuns() { diff --git a/pkg/cron/service_test.go b/pkg/cron/service_test.go index a026d2c6b..c5cf288ac 100644 --- a/pkg/cron/service_test.go +++ b/pkg/cron/service_test.go @@ -186,7 +186,7 @@ func TestCronService_PersistenceIntegrity(t *testing.T) { } // test loading invalid JSON - os.WriteFile(tmpFile, []byte("{invalid json}"), 0644) + os.WriteFile(tmpFile, []byte("{invalid json}"), 0o644) cs3 := NewCronService(tmpFile, nil) err := cs3.loadStore() if err == nil {