You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ethan Wolinsky b756cf82bd
Add support for dependent jobs in enqueue_many (#1897)
* Add support for dependent jobs in enqueue_many

* Add module to register dependencies for multiple jobs

The get_ready_jobs function will process dependencies for an array of
jobs passed in. If any jobs' dependencies are already met, those jobs
are returned so they can be enqueued.

* Add check for jobs without dependencies

* Remove extra colon in dependencies key

This seems like a bug, but if I'm mistaken please let me know.

* Add bulk deferred jobs to Redis

Need to call queue.enqueue_job to create the job hash in redis. Since all of
these jobs are deferred, they won't be added to the queue and processed
by a worker.

* Revert "Remove extra colon in dependencies key"

This reverts commit 5ebf7a35009fcca410c43b9327203915ddfd0628.

* Enqueue jobs without dependencies separately

Any jobs without dependencies will be enqueued before handling

* Fix enqueue_many return value

* Rename ready_jobs function

* Fix enqueue_many return value

* Instantiate job category arrays before if statement

* Execute pipe to enqueue jobs with met dependencies

* Add tests for enqueue_many with dependencies

* Change dependency sorting function name

* Use common kwargs dict to create jobs

* Remove redundant tests for dependent jobs

* Alphebetize imports

* Test job with met dependencies using enqueue_many

* Fix typo

* Format with black

* Sort imports
2 years ago
..
config_files Update cli.py to support custom loggers (#1906) 2 years ago
ssl_config Fix RQScheduler when run with SSL connection (#1383) 4 years ago
Dockerfile Typing (#1698) 2 years ago
__init__.py Update linting configuration (#1915) 2 years ago
fixtures.py Update linting configuration (#1915) 2 years ago
test.json Allows enqueueing by the cli (#1466) 3 years ago
test_callbacks.py Update linting configuration (#1915) 2 years ago
test_cli.py Update cli.py to support custom loggers (#1906) 2 years ago
test_commands.py Update linting configuration (#1915) 2 years ago
test_connection.py [Hotfix] Fix SSL connection for scheduler (#1894) 2 years ago
test_decorator.py Update linting configuration (#1915) 2 years ago
test_dependencies.py Add support for dependent jobs in enqueue_many (#1897) 2 years ago
test_fixtures.py Update linting configuration (#1915) 2 years ago
test_helpers.py Update linting configuration (#1915) 2 years ago
test_job.py Reliable queue (#1911) 2 years ago
test_maintenance.py Reliable queue (#1911) 2 years ago
test_queue.py Reliable queue (#1911) 2 years ago
test_registry.py Update linting configuration (#1915) 2 years ago
test_results.py Update linting configuration (#1915) 2 years ago
test_retry.py Update linting configuration (#1915) 2 years ago
test_scheduler.py Scheduler should release and heartbeat only acquired locks (#1914) 2 years ago
test_sentry.py Update linting configuration (#1915) 2 years ago
test_serializers.py Update linting configuration (#1915) 2 years ago
test_timeouts.py Update linting configuration (#1915) 2 years ago
test_utils.py Update linting configuration (#1915) 2 years ago
test_worker.py Reliable queue (#1911) 2 years ago
test_worker_pool.py Update linting configuration (#1915) 2 years ago
test_worker_registration.py Update linting configuration (#1915) 2 years ago