Antoine Leclair
81679a35d9
Merge branch 'master' into custom-queue-class
...
Conflicts:
tests/test_worker.py
9 years ago
Javi Imbernon
1d6c2b98b7
Add ttl argument to decorator
9 years ago
Antoine Leclair
cc1eb9c52b
Remove test that failed on Travis CI
9 years ago
Antoine Leclair
173417f337
Remove test that failed on Travis CI
9 years ago
Antoine Leclair
05ed85804c
Worker accepts custom queue class
9 years ago
Antoine Leclair
7275f62737
Add tests for custom job class in worker
9 years ago
Antoine Leclair
5c72417cda
Do not use deprecated assertEquals
9 years ago
Antoine Leclair
2f36cedd50
Typo in test docstring
9 years ago
Selwin Ong
640b2e31a0
Merge pull request #633 from olingerc/warmshutdown
...
Save date on which a busy worker receives a warm shutdown request
9 years ago
orangain
e8165fdddf
Accept byte strings as the first argument of Worker() in Python 2
...
This make it easy to write Python 2/3 compatible code.
e.g.
Worker(sys.argv[1:])
# Without from __future__ import unicode_literals
Worker(['high', 'normal', 'low'])
9 years ago
Eduard Carreras
89facfada6
Test to ensure job is finished in not async mode
9 years ago
Christophe Olinger
b47c8efe27
Add test cases for shutdown_requested_date
9 years ago
Christophe Olinger
3e586bd6d6
Add remove current_job based on the correct upstream master branch
9 years ago
Selwin Ong
2485334100
Merge pull request #609 from tornstrom/master
...
Allow meta when enqueing
9 years ago
Tornstrom
50a114a0a8
Allow meta when enqueing
9 years ago
Selwin Ong
5afd1a90e5
Merge pull request #589 from samuelcolvin/job-started_at
...
add job.started_at
9 years ago
Selwin Ong
8bbd833855
Merge pull request #600 from glaslos/cancel_remove
...
Cancel and Delete differences
9 years ago
ahxxm
b06f112cb0
fix tests
...
syntax: assertEquals -> assertEqual, assertNotEquals -> assertNotEqual
usage: status of worker and job now will use get/set method instead of property method
9 years ago
glaslos
0a6df13d9d
delete dependents and delete in cleanup. Fixed tests.
9 years ago
Samuel Colvin
3aa7aebf87
remove assert_dt_between from worker tests
9 years ago
Samuel Colvin
1349e90ba2
test docstrings, and sentinel test
9 years ago
Samuel Colvin
082e61a212
add job.started_at
9 years ago
Samuel Colvin
fa48751fed
correct SLOW env var, run slow tests on ci
9 years ago
Samuel Colvin
aada162a4d
worker shutdown tests
9 years ago
Selwin Ong
e538512c79
Merge branch 'master' of github.com:nvie/rq
...
Conflicts:
tests/test_job.py
9 years ago
Selwin Ong
0e4112da7a
Modified patch_connection to allow Redis connection to be easily mocked.
9 years ago
Selwin Ong
1a089887c0
Merge pull request #564 from jlopex/javi/fix_dependent_jobs_on_different_queues
...
support multiple queues on dependent jobs
9 years ago
Vincent Driessen
c1a4780d10
Fix PEP8 complaints
9 years ago
Javier Lopez
a2d0e4f933
Clarify test_enqueue_dependents_on_multiple_queues
9 years ago
Javier Lopez
c76c59133b
Fix ValueError exception on relative import
...
test_job raised an exception:
ValueError: Attempted relative import in non-package
9 years ago
Javier Lopez
c136209804
Add test_enqueue_dependents_on_mulitple_queues test
9 years ago
Selwin Ong
e6a499ada8
Merge pull request #561 from selwin/async-bug
...
Sync jobs should be cleaned up after execution.
10 years ago
Selwin Ong
edd139d86f
Sync jobs should be cleaned up after execution.
10 years ago
Selwin Ong
3c3646cf91
Merge branch 'master' into exception_handling
...
Conflicts:
tests/fixtures.py
10 years ago
Selwin Ong
8bfbeac67d
Running rqworker without specifiying --exception-handler shouldn't override default behavior.
10 years ago
Vincent Driessen
3b67894489
Rename variable in test
10 years ago
Vincent Driessen
ec0e04727b
Rename `maintenance_date` -> `last_cleaned_at`
10 years ago
Vincent Driessen
4d0ae5da98
Clean up type checking of Worker constructor
10 years ago
Marcus Martins
ab6c129833
Fix broken tests
10 years ago
Marcus Martins
5b8726ad2d
Fixes #502
...
Fixes some broken tests and misbehaviour with ttls. There was a temporal
coupling between saving the job and setting its expires parameter.
10 years ago
Robert Brownstein
3d8faa0e5d
Added proper conditional behavior to unicode fixture for python 3
10 years ago
Robert Brownstein
303f4ed47c
Added test coverage for unicode keyword argument support in method signatures ( #536 )
10 years ago
Selwin Ong
f370f79819
Merge pull request #534 from selwin/registry-maintenance
...
Worker automatically cleans job registries every hour
10 years ago
Selwin Ong
c3767e28e2
Worker now runs maintenance tasks every hour and on startup.
10 years ago
Selwin Ong
5782ac10c4
Added worker.clean_registries().
10 years ago
Selwin Ong
faf9d3e668
Added clean_registries(queue) function to clean job registries related to that queue.
10 years ago
RyanMTB
9a00b0eca6
Updated Worker API
10 years ago
Selwin Ong
70d5f971bd
Jobs from FinishedJobRegistry that are moved to FailedQueue should have "failed" as status.
10 years ago
Vincent Driessen
f651a72a50
Make clearer what are fixture functions
10 years ago
Vincent Driessen
df4d4c8d5d
Make test cases more explicit
10 years ago
Vincent Driessen
82df2ee689
Fix PEP8 issue
10 years ago
Selwin Ong
cff6fbff41
Merge pull request #477 from glaslos/ttl_tests_fixes
...
TTL tests and fixes
10 years ago
glaslos
071c47dacb
hard-coded TTL to -1 on job.perform()
...
Removed merge artifacts
10 years ago
Serhii Maltsev
91f263d8e0
change try/except in python2/3 compatibility to to_text()
10 years ago
Tamir Duberstein
985a2664a4
Prevent `Queue#dequeue` from blowing the stack
...
In the case of many sequential jobs having been deleted, a recursive
implementation of `Queue#dequeue` is prone to blowing the stack in the
absence of tail-recursion support. Change the implementation from
recursive to iterative to work around this issue in CPython.
10 years ago
glaslos
3d4d6a86d5
persist the job right before execution
10 years ago
glaslos
24d5e08992
Merge branch 'master' into ttl_tests_fixes
...
Conflicts:
tests/test_job.py
10 years ago
Selwin Ong
30b21ef06e
Merge pull request #465 from marklap/workerbirthdeath
...
add birth_date and death_date properties to Worker
10 years ago
Mark LaPerriere
636a537fa7
updates addressing @selwin comments for PR #465
10 years ago
Bradley Young
d56b5424c8
merging master and fixing conflicts
10 years ago
alternativshik
219f21b637
Allow non-ASCII characters in arguments
...
get_call_string() failed if any arguments contained non-ASCII strings.
Fixes #406
10 years ago
Selwin Ong
1005222371
Restored the ability to specify connection params in config
10 years ago
Mark LaPerriere
450c5969aa
call register birth in the register birth test
10 years ago
Mark LaPerriere
af5a8624a6
add tests for birth and death worker methods
10 years ago
Vincent Driessen
b8d425b318
Various PEP8 fixes.
10 years ago
Vincent Driessen
fac2b10309
Auto-sort imports using isort.
10 years ago
glaslos
646f1cda22
Merge branch 'master' into ttl_tests_fixes
...
Conflicts:
rq/queue.py
10 years ago
glaslos
3af0e95ce5
adding two tests to ensure ttl behaviour
10 years ago
Selwin Ong
105b95e9b8
Fixed an error in super call.
10 years ago
Selwin Ong
de1cd8a83c
Fixed test error in Python 3.
10 years ago
Bradley Young
d3e4fb567b
merge && updates to add multiple exception handlers.
10 years ago
Selwin Ong
dac0be6cc7
Added DeferredJobsRegistry to keep track of deferred jobs.
10 years ago
Selwin Ong
3e674fbe6a
queue.enqueue() should set job.origin.
10 years ago
Selwin Ong
7fd2ac8ca6
Added "DEFERRED" Job status for jobs that have unsatisfied dependencies.
10 years ago
Selwin Ong
0a0a81da6d
Merge pull request #463 from conslo/skip-queue
...
Skip queue
10 years ago
Jonathan Tushman
60c27d5a27
fixing xrange for python3 compatability
10 years ago
Jonathan Tushman
1ae5a12a81
merging master
10 years ago
Jonathan Tushman
ccd41396f6
adding suspend with duration test
10 years ago
Travis Johnson
2667088b68
changed the kwarg, but forgot to change the test
10 years ago
Travis Johnson
add4d625b6
Merge branch 'nvie' into skip-queue
...
Conflicts:
rq/queue.py
10 years ago
Vincent Driessen
cd0c3c9c1e
Merge pull request #462 from conslo/worker-hash
...
Worker hash
10 years ago
Jonathan Tushman
82333d2ad5
triggering shutdown by setting a redis flag
10 years ago
Selwin Ong
e1801c5c44
Merge pull request #453 from glaslos/job_ttl
...
TTL for jobs
10 years ago
Travis Johnson
d4b72d330d
test for skip_queue mechanics
10 years ago
Travis Johnson
6ef9177a7d
2.6 compatible set syntax
10 years ago
Travis Johnson
de72f98fbe
test for workers equality
10 years ago
Nic Cope
09cab7a90d
Allow maximum job age to be specified when cleaning up or getting expired jobs from a registry.
...
This ensures that all jobs cleaned from a started registry end up in the failed queue.
10 years ago
glaslos
8a3fd91e2e
renaming job.job_ttl to job.ttl
10 years ago
Selwin Ong
2091c601b1
Merge pull request #451 from conslo/depend-on-unsaved-job-ids
...
Depend on unsaved job ids
10 years ago
Nic Cope
8fa184b86b
Ensure the FinishedJobRegistry honors an 'infinite' result_ttl of -1
10 years ago
glaslos
55c541bc59
added job ttl to queue.enqueue()
10 years ago
Travis Johnson
b14f739dfe
no need for that save anymore
10 years ago
Travis Johnson
82729c98dc
test for id based job dependancies
10 years ago
Bradley Young
5caccaabfe
Adding optional list handling to the exc_handler option in Worker.
...
Adding command line --exception_handler option (with multiple entries allowed) to `rq worker`
Added tests for command line options.
10 years ago
Adam Wen
cd0230cae3
make job description unicode friendly
10 years ago
zhangliyong
3d49784bcc
Merge branch 'master' of github.com:nvie/rq into cli-rq-worker
10 years ago
Selwin Ong
2307bc8253
Added FinishedJobRegistry to monitor finished jobs.
10 years ago
Selwin Ong
74a9982ecb
Fixed a bug where expired jobs aren't deleted from JobStartedRegistry.
10 years ago
Selwin Ong
18c6ea64ef
Merge pull request #419 from selwin/registry-len
...
Added JobStartedRegistry.count
10 years ago
zhangliyong
f9511664c8
Make flake8 happy :)
10 years ago
zhangliyong
94e494e645
Add testcase for rq worker command
10 years ago
zhangliyong
918403e371
Update test_cli
10 years ago
Selwin Ong
202be75b21
Merge pull request #415 from foxx/feature/custom-job-ids
...
Allow job ID to be set on enqueue/enqueue_call() - fixes #412
10 years ago
Selwin Ong
c1dc30eae3
Added __len__ method to Queue.
10 years ago
Selwin Ong
fae7df5aa7
Renamed StartedJobRegistry.get_job_count to StartedJobRegistry.count for consistency.
10 years ago
Selwin Ong
41ae1ce8a7
Added a registry.get_job_count().
10 years ago
Cal Leeming
6aa2e18f88
Another unused import, oops
10 years ago
Vincent Driessen
7686785d61
Merge branch 'selwin-working-queue'
...
Conflicts:
tests/test_worker.py
10 years ago
Vincent Driessen
4b7c59d68d
Fix PEP8 complaints.
10 years ago
Selwin Ong
6d79082b62
Call move_expired_jobs_to_failed_queue before returning job_ids.
10 years ago
Selwin Ong
dc12f8aee5
Fixed random registry failures when run on slower machines.
10 years ago
Selwin Ong
9341a4a33d
Renamed WorkingQueue to StartedJobRegistry.
10 years ago
Selwin Ong
4d90cc062e
Add job to WorkingQueue before execution and remove from WorkingQueue after.
10 years ago
Selwin Ong
a28575088b
Implemented WorkingQueue.cleanup().
10 years ago
Selwin Ong
3dc008d090
Added WorkingQueue class.
10 years ago
Vincent Driessen
9ab46804c6
Merge pull request #417 from foxx/feature/testworker
...
Added test worker for unit tests - fixes #413
10 years ago
foxx
52c3ad0fbf
Renamed to SimpleWorker
10 years ago
foxx
23cae3a420
Fixed bug caused by broken merge, my bad
10 years ago
foxx
16ee71f26d
Use class for test worker, and performs PID check in unit tests, #412
10 years ago
Vincent Driessen
dab8373311
Fix all tests.
10 years ago
Vincent Driessen
c860beb4d5
Fix broken imports.
10 years ago
Vincent Driessen
fc803f5d0d
Fix various flake8 complaints.
10 years ago
foxx
72bc9e37b7
Forced job_id to only allow str/unicode
10 years ago
foxx
05c1d4fa4b
Added better job ID tests
10 years ago
foxx
6bb8b26114
Allow job ID to be set on enqueue/enqueue_call() - fixes #412
10 years ago
zhangliyong
5883bb9efe
Make pep8
10 years ago
zhangliyong
0ddd174868
Fix invoking requeue command bug in test_requeue
10 years ago
zhangliyong
8782b11f1e
Adjust test_requeue
10 years ago
zhangliyong
1ab92602e8
Add testcase for rq_cli
10 years ago
Vincent Driessen
3ded050804
Replace by a string just as wide to not make this invalid binary pickle data.
11 years ago
Vincent Driessen
79db282879
Support enqueueing callable classes.
...
Fixes #388 .
11 years ago
Vincent Driessen
12932a433b
Merge pull request #382 from selwin/cancel-should-remove-from-queue
...
job.cancel() should remove itself from queue
11 years ago
Selwin Ong
638211df20
job.cancel() should remove itself from queue.
11 years ago
Selwin Ong
7ac1c3500a
Worker.__init__ should accept custom job class.
11 years ago
Selwin Ong
141278bb42
Queue.__init__ supports job_class argument.
11 years ago
Vincent Driessen
eb469f8da0
Fix broken stub in tests.
11 years ago
Vincent Driessen
da70ba580b
Fix broken import.
11 years ago
Vincent Driessen
c5939479b5
Merge remote-tracking branch 'origin/master' into SanyerMyasoedov-master
...
Conflicts:
rq/decorators.py
tests/__init__.py
tests/test_decorator.py
11 years ago
Vincent Driessen
ab9e6b852e
Fix PEP8 complaints.
11 years ago
Vincent Driessen
38ec259b6e
Enable the most modern Python syntax.
11 years ago
msoedov
e76020d894
Removed @resolve_connection from job decorator.
...
-- resolve_connection already presence inside Queue __init__.
11 years ago
msoedov
dd994142b3
Added tests and updated requirements with mock lib.
11 years ago
Vincent Driessen
5fe82bd543
Merge pull request #341 from SanyerMyasoedov/master
...
Added depends_on to job decorator
11 years ago
msoedov
46c96f9481
Added depends_on to job decorator
11 years ago
Selwin Ong
4f918041e3
Rearranged how explicit kwargs are passed into queue.enqueue(). Fixes #322
11 years ago
Selwin Ong
f5c3c9a6dd
Deprecate job.status.
11 years ago
Selwin Ong
2fe5d9e25e
Python 3 compatibility with worker.get_current_job().
11 years ago
Selwin Ong
802ecb5ccb
Renamed worker.set_job_id() and worker.get_job_id() for consistency.
11 years ago
Selwin Ong
93bb9ec5f4
Added tests for worker.get_current_job().
11 years ago
Vincent Driessen
a2213f1364
Fix tests.
11 years ago
Vincent Driessen
85a7a14a4c
Replace substring in Pickle string differently.
...
Pickle uses a new format since Python 3, which is incompatible with
Python 2. This problem now pops up because the replacement string had
a different length, so we broke the pickle protocol with this test.
11 years ago
Vincent Driessen
44233709ed
Allow two-way setting of job data properties.
...
As a side-effect, this also enables us to lazily load the data.
11 years ago
Malthe Borch
ba0b39a43b
Unpickle job data lazily. This fixes issue #294 .
11 years ago
Malthe Borch
c5a381fbe9
Remove dependency on 'times' library (see issue #286 ).
...
Basically, for the functionality needed, a dependency on 'times' (which
in turn depends on 'python-dateutil') seem unnecessary.
11 years ago
Joshua Chia
ef2bbe762b
Minor cleanup: Use Status enums instead of strings
11 years ago
Selwin Ong
b997fb45bf
Removed unnecessary lines from test_job.py.
11 years ago
Selwin Ong
8aa5771646
job.cancel() now deletes dependents_key
11 years ago
Vincent Driessen
7fdd115e28
Merge branch 'jchia-master'
...
Conflicts:
rq/job.py
rq/queue.py
11 years ago
Vincent Driessen
01f9a98ad9
Make test more readable by using constants.
11 years ago
Vincent Driessen
bb3dc5b0b2
Terminology change: waitlist -> dependents.
11 years ago
Joshua Chia
b89d6c8990
Set timeout at Job creation instead of during enqueueing; made Queue.enqueue_call respect `timeout` when `after` is specified
11 years ago
Selwin Ong
15c4b562ba
Reverse dependency mapping should be a set instead of a list.
11 years ago
Selwin Ong
93e5e552b7
Replaced "after" kwarg with "depends_on".
11 years ago
Mark Tozzi
0713ad03c2
Empty now deletes all jobs in the queue
11 years ago
Vincent Driessen
1fed0e0ed5
PEP8ify.
11 years ago
Vincent Driessen
d92022bb83
Record new behaviour of Queue.all() explicitly in a test.
11 years ago
Vincent Driessen
13b8d03c59
Remove misleading test.
11 years ago
Rob Harrigan
02c5d902ec
Merge remote-tracking branch 'upstream/master'
...
Conflicts:
tests/test_queue.py
11 years ago
Rob Harrigan
5e4d5f642e
Only save queue to set on enqueue.
...
Validate queue key still exists when all() is called
11 years ago
Selwin Ong
fd44ad39d4
Python 3 fixes for job dependency stuff.
11 years ago
Selwin Ong
fcfe55fe13
Merge branch 'master' into job_dependency
...
Conflicts:
rq/job.py
rq/queue.py
11 years ago
Rob Harrigan
c08b96e027
Use a redis set to store queue names, instead of relying on the redis "keys" method,
...
which does not perform well on large databases.
11 years ago
Vincent Driessen
1274b09115
Use constants in tests, instead of calling more functions.
11 years ago
Vincent Driessen
90fcb6c9d0
PEP8ify.
11 years ago
H. İbrahim Güngör
10bda9684d
Pass description parameter to job constructor in order to distinguish job names in queue.jobs or in rq-dashboard. Add related test case.
12 years ago
Alex Morega
328e7611d3
use utf-8 instead of ascii
12 years ago
Alex Morega
8d61d3bf26
port string handling to py3
...
Redis uses byte values for everything. We save queue names and job
IDs as unicode. So we need to convert every time we get data from redis.
12 years ago
Vincent Driessen
670a4e2a4e
Python 3 chokes on this one. Whatever man.
12 years ago
Alex Morega
a3b5ce5e46
accomodate py3 imports and builtins
12 years ago
Wojciech Bederski
f9897ea920
register_sentry breaks failed queue when func cannot be imported
12 years ago
Selwin Ong
e7e8579888
Merge branch 'master' of git://github.com/nvie/rq into job_dependency
...
Conflicts:
rq/queue.py
12 years ago
Selwin Ong
2e826e2b1f
Internally renamed the term "parent" to "dependency".
12 years ago
Selwin Ong
0dfb041383
Simplify enqueue_waitlist by using lpop.
12 years ago
Selwin Ong
18ff57ef35
Avoid race conditions when enqueueing job with dependency.
12 years ago
Vincent Driessen
7ea02d4029
Add explicit classmethod test.
12 years ago
Vincent Driessen
a5dff6659c
Replace the Calculator fixture by a Number fixture.
...
This makes the tests a little more realistic, since I want to add a test
for class methods.
12 years ago
Selwin Ong
6550f86646
Don't enqueue waitlisted jobs on failed execution.
12 years ago
Selwin Ong
eadc7db29f
First stab at writing implementing job dependency.
12 years ago
Selwin Ong
85e9014296
Moved some logic from worker.perform_job() to job.cleanup().
12 years ago
Selwin Ong
c987569650
Safe fetching a deleted job removes the deleted job from queue.
12 years ago
Vincent Driessen
640195d5e4
Merge branch 'master' into yaniv-aknin-worker_ttl
12 years ago
Selwin Ong
e5fa82aa5d
Merge branch 'master' of github.com:selwin/rq
12 years ago
Selwin Ong
05d744c9af
Requeuing a job should set its status back to Queued.
12 years ago
Vincent Driessen
54254f2271
Patch the connection instances.
...
This patches the connection object (which is either a StrictRedis
instance or a Redis instance), to have alternative class methods that
behave exactly like their StrictRedis counterparts, no matter whether
which type the object is. Only the ambiguous methods are patched. The
exhaustive list:
- _zadd (fixes argument order)
- _lrem (fixes argument order)
- _setex (fixes argument order)
- _pipeline (always returns a StrictPipeline)
- _ttl (fixes return value)
- _pttl (fixes return value)
This makes it possible to call the methods reliably without polluting
the RQ code any further.
12 years ago
Yaniv Aknin
4925b09aa5
Set worker ttl and maintain it when idle/taking/finishing jobs
...
This change could use far better test coverage, but I'm not sure how to
test it without refactoring more of the code than I think is reasonable
in the scope of this work.
12 years ago
Yaniv Aknin
74c2351232
Refactor dequeue_any to accept arbitrary timeouts
...
The 'blocking' parameter was replaced with a 'timeout' parameter.
The timeout parameter is interpreted thus:
0 - no timeout (block forever, equivalent to blocking=True)
None - non-blocking (return value or None immediately, equivalent to
blocking=False)
<integer> - maximum seconds to block
Upon timing out, a dequeue operation will raise DequeueTimeout.
12 years ago
Vincent Driessen
06b48c2026
Use unittest2 for Python 2.6.
12 years ago
Vincent Driessen
d1c2b3b78d
Merge branch 'selwin-remove-logbook'
...
Conflicts:
rq/utils.py
rq/worker.py
setup.cfg
setup.py
12 years ago
Selwin Ong
f498de57b6
Always call job.save even on synchronous queues so get_current_job doesn't fail
12 years ago
Vincent Driessen
10237ddcb4
Merge branch 'job-access-within-job'
...
Conflicts:
CHANGES.md
rq/job.py
12 years ago