Hi everybody!
I was trying to run jobs and everything was fine until I added bleve.Open into my script init.
The problem is that bleve.Open runs a file-based locking for concurrent processes.
Suddenly, jobs stopped working. All new Workers got into new state and that's about it.
After some debugging I found out that Worker works by starting second process and that process was basically locked, because bleve.Open was called before Admin initialization.
I think the documentation for qor/worker would benefit from information on how default cron runner works.
Something along these lines:
Worker runs by running second instance of your binary with --qor-job ID, so if you have any locks for concurrent processes - you need to have them after the Admin.MountTo(..) call
Hi everybody!
I was trying to run jobs and everything was fine until I added
bleve.Openinto my script init.The problem is that
bleve.Openruns a file-based locking for concurrent processes.Suddenly, jobs stopped working. All new Workers got into
newstate and that's about it.After some debugging I found out that Worker works by starting second process and that process was basically locked, because
bleve.Openwas called beforeAdmininitialization.I think the documentation for qor/worker would benefit from information on how default
cronrunner works.Something along these lines: