Commit 2af22d70 authored by Klaus Aehlig's avatar Klaus Aehlig
Browse files

Provide a function to set the received times tamp of a job



This is the pure function for changing the received time stamp;
obtaining the actual time stamp has to be done in IO.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
parent c3a70209
......@@ -34,6 +34,7 @@ module Ganeti.JQueue
, Timestamp
, noTimestamp
, currentTimestamp
, setReceivedTimestamp
, opStatusFinalized
, extractOpSummary
, calcJobStatus
......@@ -184,6 +185,10 @@ queuedJobFromOpCodes jobid ops = do
, qjEndTimestamp = Nothing
}
-- | Attach a received timestamp to a Queued Job.
setReceivedTimestamp :: Timestamp -> QueuedJob -> QueuedJob
setReceivedTimestamp ts job = job { qjReceivedTimestamp = Just ts }
-- | Job file prefix.
jobFilePrefix :: String
jobFilePrefix = "job-"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment