We planned to upgrade GitLab and Mattermost to the latest version this Friday morning (early). You may experience some downtime!

Commit edadd492 authored by Bas Lijnse's avatar Bas Lijnse

Merge branch 'removeDuplicateProcessEvents' into 'master'

remove duplicate TaskEval.processEvents (also in TaskServer)

See merge request !162
parents 500728ad d3960983
Pipeline #12433 failed with stage
in 2 minutes and 15 seconds
......@@ -54,11 +54,6 @@ extendCallTrace :: !TaskId !TaskEvalOpts -> TaskEvalOpts
* Get the next TaskId
*/
getNextTaskId :: *IWorld -> (!TaskId,!*IWorld)
/**
* Dequeues events from the event queue and evaluates the tasks instances
* @param Maximum amount of events to process at once
*/
processEvents :: !Int *IWorld -> *(!MaybeError TaskException (), !*IWorld)
/**
* Evaluate a task instance
......
......@@ -54,19 +54,6 @@ getNextTaskId :: *IWorld -> (!TaskId,!*IWorld)
getNextTaskId iworld=:{current=current=:{TaskEvalState|taskInstance,nextTaskNo}}
= (TaskId taskInstance nextTaskNo, {IWorld|iworld & current = {TaskEvalState|current & nextTaskNo = nextTaskNo + 1}})
processEvents :: !Int *IWorld -> *(!MaybeError TaskException (), !*IWorld)
processEvents max iworld
| max <= 0 = (Ok (), iworld)
| otherwise
= case dequeueEvent iworld of
(Nothing,iworld) = (Ok (),iworld)
(Just (instanceNo,event),iworld)
= case evalTaskInstance instanceNo event iworld of
(Ok taskValue,iworld)
= processEvents (max - 1) iworld
(Error msg,iworld=:{IWorld|world})
= (Ok (),{IWorld|iworld & world = world})
//Evaluate a single task instance
evalTaskInstance :: !InstanceNo !Event !*IWorld -> (!MaybeErrorString (TaskValue DeferredJSON),!*IWorld)
evalTaskInstance instanceNo event iworld
......
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