@@ -4,7 +4,7 @@ django-eb-sqs is a simple task manager for the Elastic Beanstalk Worker Tier. It
44
55### Installation
66
7- Install the module with ` pip install django-eb-sqs ` or add it to your ` requirements.txt ` .
7+ Install the module with ` pip install git+git://github.com/cuda-networks/ django-eb-sqs.git ` or add it to your ` requirements.txt ` .
88
99Don't forget to add django-eb-sqs app to your Django ` INSTALLED_APPS ` settings:
1010``` python
@@ -94,6 +94,17 @@ For example:
9494python manage.py run_eb_sqs_worker --url http://127.0.0.1:80/worker/process --queue default
9595```
9696
97+ #### Executing Tasks without Elastic Beanstalk
98+
99+ Another way of executing tasks is to use the Django command ` process_queue ` .
100+ This command can work with one or more queues, reading from the queues infinitely and executing tasks as they come-in.
101+
102+ ``` bash
103+ python manage.py process_queue --queues < comma-delimited list of queue names>
104+ ```
105+
106+ This is a good idea for someone who wants to execute tasks without an Elastic Beanstalk worker.
107+
97108
98109#### Group Tasks
99110Multiple tasks can be grouped by specifing the ` group_id ` argument when calling ` delay ` on a task.
@@ -119,6 +130,9 @@ def group_finished(group_id):
119130
120131The following settings can be used to fine tune django-eb-sqs. Copy them into your Django ` settings.py ` file.
121132
133+ - EB_AWS_REGION (` us-east-1 ` ): The AWS region to use when working with SQS.
134+ - EB_SQS_MAX_NUMBER_OF_MESSAGES (` 10 ` ): The maximum number of messages to read in a single call from SQS (<= 10).
135+ - EB_SQS_WAIT_TIME_S (` 2 ` ): The time to wait (seconds) when receiving messages from SQS.
122136- EB_SQS_AUTO_ADD_QUEUE (` True ` ): If queues should be added automatically to AWS if they don't exist.
123137- EB_SQS_DEAD_LETTER_MODE (` False ` ): Enable if this worker is handling the SQS dead letter queue. Tasks won't be executed but group callback is.
124138- EB_SQS_DEFAULT_DELAY (` 0 ` ): Default task delay time in seconds.
0 commit comments