Commit Graph

1017 Commits

Author SHA1 Message Date
Ilan Steemers
5f46d11350 Updates version changes in docs 2020-01-17 16:15:05 +01:00
Ilan Steemers
c2e96c1754 Removes python 3.6 testing
Removes django 1.11 testing
Adds python 3.8 testing
2020-01-17 16:03:16 +01:00
Ilan Steemers
8a9b15dbcb Updates testing packages requirements 2020-01-17 15:49:17 +01:00
Ilan Steemers
f825730716 Using the point releases 2020-01-17 15:44:36 +01:00
Ilan Steemers
38082d1593 Tests with Django 3 2020-01-17 15:39:27 +01:00
Ilan Steemers
681375364d Merge pull request #393 from ossobv/sync
Preserve database connection when sync=True
2020-01-17 15:34:46 +01:00
Ilan Steemers
d2c9aa0e88 Merge pull request #395 from Koed00/dependabot/pip/django-2.2.8
Bump django from 2.2.5 to 2.2.8
2020-01-17 15:33:25 +01:00
Ilan Steemers
850e6e5452 Merge pull request #399 from theunraveler/ugettext
Replacing `ugettext_` functions with `gettext_` for Django 3
2020-01-17 15:32:27 +01:00
Ilan Steemers
8bf88bee21 Merge pull request #403 from valentinogagliardi/redis-url
ability to use a Redis connection URI - closes #402
2020-01-17 15:31:37 +01:00
valentinogagliardi
c12e6184eb add test for Redis URL 2020-01-12 20:10:06 +01:00
valentinogagliardi
458697c099 add missing semicolon 2020-01-12 19:23:19 +01:00
valentinogagliardi
fa1082ff96 ability to use a Redis connection URI - closes #402 2020-01-12 13:13:41 +01:00
Jake Bell
dc65f5e1de Replacing ugettext_ functions with gettext_ for Django 3 2020-01-07 15:57:37 -06:00
dependabot[bot]
48d23477a6 Bump django from 2.2.5 to 2.2.8
Bumps [django](https://github.com/django/django) from 2.2.5 to 2.2.8.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/2.2.5...2.2.8)

Signed-off-by: dependabot[bot] <support@github.com>
2019-12-04 21:54:03 +00:00
Harm Geerts
66588a28e7 Preserve database connection when sync=True
When tasks run synchronously django-q should only affect the calling
context by running the tasks.
Fixes https://github.com/Koed00/django-q/issues/326
2019-11-27 12:37:31 +01:00
Ilan Steemers
70269e1e43 Updates to Django 2.2.5 2019-09-26 11:53:09 +02:00
Ilan Steemers
563292c045 Updates boto, pymongo and redis for testing 2019-08-14 11:14:32 +02:00
Ilan Steemers
c27938ee62 Merge pull request #333 from tremby/fix-timeout-override
Fix timeout override
2019-08-13 14:16:03 +02:00
Ilan Steemers
2a57c6c3c2 Merge pull request #347 from maerteijn/fix-scheduler-concurrency
Fix scheduler concurrency with multiple clusters
2019-08-13 14:13:14 +02:00
Martijn Jacobs
958c79e728 Fixes an outdated link to the django documentation 2019-08-12 14:44:12 +02:00
Martijn Jacobs
924ff928b0 Lock the Schedule objects to ensure tasks are created once
Tested this with PostgreSQL and MySQL
2019-08-12 14:28:26 +02:00
Martijn Jacobs
abaa0ba39b Don't call the scheduler twice: respect Conf.SCHEDULER 2019-08-12 14:27:56 +02:00
Ilan Steemers
8a6c9d2094 Bump django version in Travis 2019-08-10 14:49:47 +02:00
Ilan Steemers
9f97a90b98 Bump Django LTS version 2019-08-10 14:49:31 +02:00
Ilan Steemers
5ca8b753fd Bump version 2019-08-10 14:43:30 +02:00
Ilan Steemers
c000150403 Merge pull request #358 from vkaracic/readme-test
Fix test section format in readme
2019-08-10 14:31:53 +02:00
Ilan Steemers
7d437ea5cf Merge pull request #353 from maerteijn/fix-mysql-naive-datetime-in-scheduler
Fix issue when using USE_TZ=False with MySQL
2019-08-10 14:16:11 +02:00
Ilan Steemers
cfeceb497d Merge pull request #356 from lamby/import-error-issue-331
Inline import to prevent circular imports under some toolchain combinations
2019-08-10 14:14:30 +02:00
Ilan Steemers
a72b8171ec Merge pull request #363 from wgordon17/patch-1
Remove and re-add task.id field instead of alter
2019-08-10 14:13:43 +02:00
Ilan Steemers
c00fa22aea Merge pull request #355 from tylerharper/patch-1
fix spelling of careful
2019-08-10 14:06:32 +02:00
Ilan Steemers
16fa6fa8d9 Fixes deprecated arrow syntax 2019-08-10 14:03:03 +02:00
Ilan Steemers
918a1b2208 Updates test requirements 2019-08-10 14:02:43 +02:00
Will Gordon
c037f405de Remove and replace task.id field, instead of Alter 2019-06-04 20:51:51 -04:00
Vedran Karacic
3dc4765796 Fix test section format in readme 2019-05-08 13:42:38 +02:00
Chris Lamb
5c8243903f Inline import to prevent circular imports under some toolchain combinations. (Closes: #331) 2019-04-26 09:19:21 +01:00
Tyler Harper
3882f1c4d4 fix spelling of careful
Fixed spelling of careful
2019-04-24 14:19:48 -04:00
Martijn Jacobs
c0cda97864 Don't save the next_run field as TZ aware when USE_TZ is False
arrow always returns a tz aware datetime, and we don't want this when we explicitly configured django with USE_TZ=False. This causes issues with MySQL.
2019-04-17 15:02:20 +02:00
Ilan Steemers
c84fd11a67 Merge pull request #337 from jannero/timer-handling
Fix concurrency issue in timeout timer value processing
2019-02-11 13:28:50 +01:00
Ilan Steemers
d3f42b46d4 Merge pull request #340 from jannero/retry-documentation
Document the behaviour of retry value properly
2019-02-11 13:25:08 +01:00
Janne Rönkkö
d55d33ce27 Document the behaviour of retry value properly
This issue has been reported many times in Django-Q's issue tracker:
https://github.com/Koed00/django-q/issues/183
https://github.com/Koed00/django-q/issues/180
https://github.com/Koed00/django-q/issues/307

All these issue have been closed and responses have noted that retry should
be set bigger than timeout or duration of any task.
2019-02-06 16:49:09 +02:00
Janne Rönkkö
bca22054df Fix concurrency issue in timeout timer value processing
According to multiprocessing documentation for Value
(https://docs.python.org/3/library/multiprocessing.html#multiprocessing.Value)
reads and writes are protected with lock when the lock argument is True
(the default) or the lock argument is an instance of Lock or RLock. The
documentation states that operations like += are not atomic as that
involves reading and writing.

On the worker side the critical section includes also storing finished task
result because the timeout could happen after the task function has
finished but before the result has been stored and timer.value has been
updated to tell the guard process that the task has been finished.

On the guard side the critical section includes all checks done to see
if the worker has timed out or died and the actual reincarnation function
because the worker could update timer value to -1 (idle) or -2 (recycle)
after the guard has seen timer value 0 (timeout) and is going to terminate
the worker.
2019-01-28 08:39:56 +02:00
Ilan Steemers
44d963b716 Merge pull request #327 from mattaw/master
Modified django_q imports to support Python 3.4 again in cluster.py. …
2019-01-27 18:34:30 +01:00
Ilan Steemers
2824fed230 Merge pull request #334 from jannero/test-docs
Document how to run tests on your computer
2019-01-27 18:33:37 +01:00
Ilan Steemers
198ab59555 Merge branch 'master' into fix-timeout-override 2019-01-27 18:30:05 +01:00
Ilan Steemers
9611423732 Merge pull request #336 from jannero/timeout
Timeout handling fix and improvements to related tests
2019-01-27 18:26:51 +01:00
Janne Rönkkö
0e2df88d92 Fix async_task timeout parameter handling when cluster timeout is set to None (the default)
The cluster timeout configuration default value None is documented to mean
tasks never timeout out. Also the documentation states that the timeout
can be overridden for individual tasks.

With the old implementation the timeout parameter given to async_task was
not honored if the cluster timeout was set to None.

Fixes: #335
2019-01-27 19:09:22 +02:00
Janne Rönkkö
2e7bf60ff4 Document how to run tests on your computer 2019-01-27 16:49:42 +02:00
Janne Rönkkö
2650659da9 Allow timeout unit tests to fail properly
The old implementation used count_forever test task that never finishes.
If the timeout implementation does not work in the test, the test never
end and you was required to kill the test runner.
2019-01-27 15:35:17 +02:00
Janne Rönkkö
d09e2658be Add test for task finishes before timeout 2019-01-27 15:35:17 +02:00
Janne Rönkkö
888324cf48 Reduce code duplication in timeout unit tests 2019-01-26 20:44:31 +02:00