Skip to content

Commit 3bbbf0a

Browse files
authored
Update readme for activejob EBS worker (#148)
1 parent eed32d5 commit 3bbbf0a

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -471,9 +471,15 @@ require_relative 'config/environment' # load rails
471471
### Elastic Beanstalk workers: processing activejobs using worker environments
472472

473473
Another option for processing jobs without managing the worker process is hosting the application in a scalable
474-
[Elastic Beanstalk worker environment](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features-managing-env-tiers.html).
475-
This SDK includes Rack middleware that can be added conditionally and which will process requests from the
476-
SQS Daemon provided with each worker instance. The middleware will forward each request and parameters to their appropriate jobs.
474+
[Elastic Beanstalk worker environment](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features-managing-env-tiers.html).
475+
[Configure the worker](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features-managing-env-tiers.html#using-features-managing-env-tiers-worker-settings)
476+
to read from the correct SQS queue that you want to process jobs from and set the
477+
```AWS_PROCESS_BEANSTALK_WORKER_REQUESTS``` environment variable to `true` in the worker environment configuration.
478+
Note that this will NOT start the poller. Instead the
479+
[SQS Daemon](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features-managing-env-tiers.html#worker-daemon)
480+
running on the worker sends messages as a POST request to `http://localhost/`. The middleware will forward each
481+
request and parameters to their appropriate jobs. The middleware will only process requests from the SQS daemon
482+
and will pass on others and so will not interfere with other routes in your application.
477483

478484
To add the middleware on application startup, set the ```AWS_PROCESS_BEANSTALK_WORKER_REQUESTS``` environment variable to true
479485
in the worker environment configuration.

0 commit comments

Comments
 (0)