Commit 4b550009 authored by Klaus Aehlig's avatar Klaus Aehlig

Fix startup order of luxid

Move the starting of the job scheduler to a later stage
in the startup. In particular, only start it after the
job-queue lock file is obtained.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarPetr Pudlak <pudlak@google.com>
parent 84d9c84e
......@@ -468,7 +468,6 @@ main :: MainFn () PrepResult
main _ _ (server, cref, jq) = do
initConfigReader id cref
let creader = readIORef cref
initJQScheduler jq
qlockFile <- jobQueueLockFile
_ <- lockFile qlockFile >>= exitIfBad "Failed to obtain the job-queue lock"
......@@ -478,6 +477,8 @@ main _ _ (server, cref, jq) = do
_ <- forkIO . void $ activateMasterIP
initJQScheduler jq
finally
(forever $ U.listener (luxiHandler (qlock, jq, creader)) server)
(closeServer server)
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