Commit 9d236b15 authored by Mart Lubbers's avatar Mart Lubbers

remove flushWritesWhenIdle backgroundtassk

parent a324c52a
Pipeline #19939 passed with stage
in 4 minutes and 43 seconds
......@@ -67,7 +67,9 @@ where
startupTasks {distributed, sdsPort}
//If distributed, start sds service task
= (if distributed [startTask (sdsServiceTask sdsPort)] [])
++ [startTask removeOutdatedSessions]
//If there are webtasks, we need to clean up sessions
++ if hasWebTasks [startTask removeOutdatedSessions] []
++ [startTask flushWritesWhenIdle]
//Start all startup tasks
++ [t \\ StartupTask t <- toStartable startable]
......@@ -90,8 +92,7 @@ where
[BackgroundTask (processEvents MAX_EVENTS)
:if (webTasks =: [])
[BackgroundTask stopOnStable]
[BackgroundTask flushWritesWhenIdle
]
[]
]
// The iTasks engine consist of a set of HTTP Web services
......
......@@ -14,6 +14,6 @@ updateClock :: !*IWorld -> *(!MaybeError TaskException (), !*IWorld)
removeOutdatedSessions :: Task ()
flushWritesWhenIdle:: !*IWorld -> (!MaybeError TaskException (), !*IWorld)
flushWritesWhenIdle:: Task ()
stopOnStable :: !*IWorld -> *(!MaybeError TaskException (), !*IWorld)
......@@ -115,8 +115,8 @@ where
= (Error e,iworld)
//When the event queue is empty, write deferred SDS's
flushWritesWhenIdle:: !*IWorld -> (!MaybeError TaskException (), !*IWorld)
flushWritesWhenIdle iworld = case read taskEvents EmptyContext iworld of
flushWritesWhenIdle:: Task ()
flushWritesWhenIdle = everyTick \iworld->case read taskEvents EmptyContext iworld of
(Error e,iworld) = (Error e,iworld)
(Ok (ReadingDone (Queue [] [])),iworld) = flushDeferredSDSWrites iworld
(Ok _,iworld) = (Ok (),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