Worker
Worker runs a single Job in the background, it can do so immediately or at a scheduled time.
Once registered with QOR Admin, Worker will provide a Workers section in the navigation tree, containing pages for listing and managing the following aspects of Workers:
- All Jobs.
- Running: Jobs that are currently running.
- Scheduled: Jobs which have been scheduled to run at a time in the future.
- Done: finished Jobs.
- Errors: any errors output from any Workers that have been run.
Note
- The default que GoQueQueue(https://github.com/tnclong/go-que) only supports postgres for now.
- To make a job abortable, you need to check
ctx.Done()
channel in job handler and stop the handler func.
Example
Action Worker
Action Worker is used to visualize the progress of long-running actions.