quantum-elixir / quantum-elixir/quantum-core

Synchronous job management API

Open
#499 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
Dominant language
Elixir
Stars
2.4k
Forks
154
Avg merge
2h 22m
Merged PRs (30d)
3

Description

I'm testing that my application adds jobs to quantum correctly based on some business restrictions and I'm using on_exit to remove jobs again after tests. This however is causing issues with the ecto sandbox, because even after calling Scheduler.delete_job the job has not been removed and jobs access the db even after being supposed to be removed. Currently I need to add a timeout here to delay my on_exit callback. While working on said feature I had similar issues with run_job, which also is async.

It would be great if the async nature of those job APIs would be highlighted in the docs and I'd really like to see options to have those operations be done synchronous as well.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Scheduler.delete_job and run_job APIs and how their asynchronous behavior affects on_exit callbacks and the Ecto sandbox. Document the current async behavior and define synchronous options for both operations, with completion shown by reliable job removal and execution in the reported test scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.