Skip to content

All jobs are in new state and not running #7

@slava-vishnyakov

Description

@slava-vishnyakov

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions