fix(cron): update file permission mode to use octal notation in test and fix some lint errors

This commit is contained in:
tong3jie 2026-03-11 18:07:01 +08:00
parent 51cb387219
commit 991c7845d5
2 changed files with 1 additions and 3 deletions

View file

@ -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() {

View file

@ -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 {