From 96622d3a2bd5ec3a78b6e8b0b4f255ff57e7adf2 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 6 Dec 2023 01:22:32 +0000 Subject: [PATCH] chore(jobsystem): switch to UTCTime instead of LocalTime --- models/jobsystem.model | 28 ++++++++++++++-------------- src/Model/Types/Jobsystem.hs | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/models/jobsystem.model b/models/jobsystem.model index d8970b451..62b3f2e0e 100644 --- a/models/jobsystem.model +++ b/models/jobsystem.model @@ -5,24 +5,24 @@ JobMeta occurrence JobOccurrence -- When should the job be executed? -- (Possibly recurring) relativeInTime TimeRelative Maybe -- TODO find better name - planExecutionAhead NominalDiffTime -- TODO find better name + planExecutionAhead NominalDiffTime -- TODO find better name executionTimeEpsilon NominalDiffTime Maybe priority JobPriority ressources JobRessources status JobStatus - lastStartSystem LocalTime Maybe -- when did a job scheduler last order - -- a job worker to execute this job? - -- when a job is to be executed now, - -- lastStartWorker and lastFinished - -- are unset - lastStartWorker LocalTime Maybe -- when did a job worker last start - -- executing this job? - -- when no time is set, the job either - -- was never executed yet or execution - -- was just ordered (or something went - -- very wrong within the jobsystem) - lastFinished LocalTime Maybe -- when did a job worker last report - -- successful execution? + lastStartSystem UTCTime Maybe -- when did a job scheduler last order + -- a job worker to execute this job? + -- when a job is to be executed now, + -- lastStartWorker and lastFinished + -- are unset + lastStartWorker UTCTime Maybe -- when did a job worker last start + -- executing this job? + -- when no time is set, the job either + -- was never executed yet or execution + -- was just ordered (or something went + -- very wrong within the jobsystem) + lastFinished UTCTime Maybe -- when did a job worker last report + -- successful execution? -- all "last..." fields should be set by the scheduler atomically! retryAfter NominalDiffTime Maybe -- if set, the scheduler checks on -- the job after this time and retries diff --git a/src/Model/Types/Jobsystem.hs b/src/Model/Types/Jobsystem.hs index e62da8ec9..7840cac12 100644 --- a/src/Model/Types/Jobsystem.hs +++ b/src/Model/Types/Jobsystem.hs @@ -13,7 +13,7 @@ import Model.Types.TH.PathPiece newtype JobOccurrence = JobOccurrence - { jobOccurrence :: Occurrence LocalTime () -- latter is specialtime; not used yet + { jobOccurrence :: Occurrence UTCTime () -- latter is specialtime; not used yet } deriving (Eq, Ord, Read, Show, Generic) deriving anyclass (NFData)