Commit Graph
66 Commits
Author SHA1 Message Date
Ilan Steemers 15155c7a99 Build improvements (#569)
* Black linting

* Adding Black to dev dependencies and upping minimal python to 3.6.2 for compatibility

* Updating packages

* Removing pip-tools input and exporting requirements with poetry

* Deleting old setup files and test runner

* Trying 1.3.7

* Looser extras requirements to prevent conflicts

* Sorted imports with isort

* Added iSort to dev dependencies

* Fixes localtime for naive setups
2021-05-30 17:10:07 +02:00
Ilan Steemers de9ba04602 Fixes deprecated count method (#549)
* Replaces deprecated count with count_documents

* Uses new re_path instead of url()
2021-05-01 16:23:37 +02:00
Gouri JavedandJaved Gouri e205674d31 added long polling support (#506)
* added long pooling support for  sqs broker

* changed the parameter name

* added long polling support ,

introduce new parameter in broker sqs block
parameter for long polling is receive_message_wait_time_seconds

eg :
Q_CLUSTER = {
      'name': 'test-queue',
      'sqs': {
         'aws_region': AWS_S3_REGION_NAME,
         'aws_access_key_id': AWS_ACCESS_KEY_ID,
         'aws_secret_access_key': AWS_SECRET_ACCESS_KEY,
         'receive_message_wait_time_seconds':20
     }
}

* added receive_message_wait_time_seconds parameter in test_broker.py

Co-authored-by: Javed Gouri <you@example.com>
2021-03-21 12:04:16 +01:00
Ilan Steemers 7d03536e89 Migrate to Github Action CI (#507)
* Some small refactors

* Initial test script

* Fixes django matrix

* Trying to set up Disque

* Disque as a docker service

* lowercase action name

* Remove Travis

* Replaces Travis badge with Github actions badge

* Show django version in step

* Typo
2021-02-14 18:59:04 +01:00
Ilan Steemers 6184a1c662 Merge pull request #478 from fallenhitokiri/sqs-get-queue-before-create
try to get SQS queue before creating it
2020-10-20 14:05:31 +02:00
Ilan Steemers 87390509ef Merge pull request #477 from fallenhitokiri/fix-get-broker-sqs
empty dictionary as configuration value for SQS
2020-10-20 14:04:30 +02:00
ihuk 5076367168 More work on fix for #424 - TypeError: can't pickle _thread.lock objects.
AWS and Mongo brockers should be pickeled correctly now.
2020-10-16 18:40:26 +02:00
ihuk 8b3d6b7d2a Initial work on fix for #424 - TypeError: can't pickle _thread.lock objects.
Made `Broker` and `Queue` classes pickable which fixes the the problem with new default `spawn` proces start method.
2020-10-14 22:21:40 +02:00
Timo Zimmermann 9be4da76c1 try to get SQS queue before creating it
In some environments permissions for an IAM role or access key might not include "SQS create".
The broker should first try to get the queue and if this fails try to create it as fall back to the current default behaviour.
2020-09-22 15:58:06 +02:00
Timo Zimmermann 73ca8edcf5 empty dictionary as configuration value for SQS
The [documentation](https://django-q.readthedocs.io/en/latest/configure.html#sqs-configuration) lists all keys as optional, but the way `get_broker` is implemented it will evaluate to false and return Redis. One way around this would be checking if the type of `Conf.SQS` is `dict`.
2020-09-22 15:42:38 +02:00
Ilan Steemers a57f7e3f89 Check for nodes 2020-06-28 20:23:56 +02:00
Ilan Steemers c8eb7ecddb Linting and hints 2020-06-14 18:48:05 +02:00
Ilan Steemers ef4c7876ae Linting and hints 2020-06-12 12:33:04 +02:00
Bastien Vallet 3569d2ea8c [cleanup] Fix some linting issues 2020-06-10 12:00:55 +02:00
Bastien Vallet 68d95a2924 [cleanup] Remove python2 artifacts 2020-06-10 11:48:31 +02:00
Martijn Jacobs 85a9f33ac0 Check for the right database when querying for get_autocommit 2020-05-01 17:29:27 +02:00
Ilan 7c31c2408c Replaces format with f-strings 2020-02-18 18:47:05 +01:00
valentinogagliardi fa1082ff96 ability to use a Redis connection URI - closes #402 2020-01-12 13:13:41 +01:00
ilan e1d1f0f099 Fixes relative imports 2018-03-13 18:32:49 +01:00
Sander van de Graaf 17ea1e7a7b Allow SQS to use environment variables 2018-01-09 13:03:51 +01:00
Yann Pomarede bbd2e82fd4 fix race condition in orm broker 2016-12-05 18:40:04 +01:00
Ilan Steemers 3a57ab1b1b Fixes typo in custom broker handler 2016-04-06 19:59:02 +02:00
Ilan Steemers c17468ef86 docs: Adds Custom broker class documentation
Also changes some of the variable and settings names, to make them less ambiguous.
2016-01-27 12:06:49 +01:00
Ilan Steemers 3ac7f26de5 Moves custom broker class to top 2016-01-27 11:11:29 +01:00
Ilan Steemers fe8015403c Adds custom broker configuration 2016-01-27 10:33:07 +01:00
Ilan Steemers af3b1da08f Makes DB polling time configurable via poll setting 2016-01-26 22:29:00 +01:00
kdmukai e4a87e167b Fix for issue referenced in
https://github.com/Koed00/django-q/issues/124
2015-12-09 11:43:45 -06:00
Ilan Steemers 08104ef777 check for default database on mongo connection
correction
2015-09-26 13:13:25 +02:00
Ilan Steemers b8bb186471 check for default database on mongo connection 2015-09-26 13:01:15 +02:00
Ilan Steemers 826178c463 Adds a MongoDB broker
* adds mongo broker tests
* adds mongo brokers docs

* broker info is now cached when it needs to connect to a server, to reduce traffic.
2015-09-25 20:03:39 +02:00
Ilan Steemers 93a8f71157 Only show lock count when available and greater than zero 2015-09-19 15:42:35 +02:00
Ilan Steemers 16c28a88e2 adds (approximate) lock_size to SQS broker
docs: added lock_size
2015-09-18 15:40:30 +02:00
Ilan Steemers 1d12107524 Changed locking mechanism
* all new tasks start as timeouts. This makes the queries a lot simpler.

* In BULK mode, the bulk update for the lock was causing actual database locks.  The lock updates are now iterated.
2015-09-17 18:49:03 +02:00
Ilan Steemers a060b3508a Moves bulk iteration to pusher 2015-09-15 14:45:06 +02:00
Ilan Steemers 2bffcf554b Django ORM broker 2015-09-14 13:24:43 +02:00
Ilan Steemers 8543c5b328 Adds Fastack option to Disque broker 2015-09-11 17:58:16 +02:00
Ilan Steemers 4c413fc659 Prevents crash on duplicate acknowledge 2015-09-10 13:31:37 +02:00
Ilan Steemers 0b9df26218 Converted SQS broker to Boto3 2015-09-10 11:08:33 +02:00
Ilan Steemers 0fe6c4cbde SQS only supports max 10 messages in bulk mode
* capped bulk at 10
* added tests
2015-09-09 19:34:06 +02:00
Ilan Steemers d7ce945f03 Amazon SQS broker 2015-09-09 18:10:03 +02:00
Ilan Steemers 8eb1431413 Resets broker configuration in case a third party broker crashes 2015-09-08 15:50:32 +02:00
Ilan Steemers c946a16b99 changes py 2.7 import for ironmq 2015-09-08 15:38:00 +02:00
Ilan Steemers d849774c86 Adds bulk option to disque broker
adds tests
2015-09-08 14:06:38 +02:00
Ilan Steemers 83548dcfbb Makes bulk a general setting 2015-09-08 13:42:15 +02:00
Ilan Steemers 0ffae4519b Adds bulk get to ironmq 2015-09-08 13:37:33 +02:00
Ilan Steemers b56cc9da8f IronMQ broker 2015-09-08 11:20:31 +02:00
Ilan Steemers 3f75e7fa05 removed SQS and IronMQ brokers for now
Both brokers are not atomic and cause all kinds of problems during testing. Needs more time.
Meanwhile I want to release the pluggable broker backend.
2015-09-04 14:49:17 +02:00
Ilan Steemers 1ccfc66254 adds fail method to broker 2015-09-03 16:34:00 +02:00
Ilan Steemers 7be533d9a6 moved auth to redis py 2015-09-03 16:14:20 +02:00
Ilan Steemers 2e4c1c86ed Adds extra AUTH before PING 2015-09-03 15:50:22 +02:00