Closed skluck closed 6 years ago
We'll update the agent to process jobs using the AWS Beanstalk Worker pattern:
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features-managing-env-tiers.html
If the worker responds with any other response code, the message will be retried or sent to dlq based on settings
index.php
sqsd-handler in the agent codebase which parses the message and starts the appropriate CLI command to process the job.
We'll need a local web-server for this, the built-in php web-server may be good enough
For handling the queue - there are a few open-source equivalents since amz's
sqsd
is not open source. (https://github.com/gilbitron/sqsd)
For now this is the quickest way to switch from naive cronjobs and allow the agents to scale up.
Long term we don't want to require aws so we'll need to make sure anything dealing with queues is able to be abstracted away (so we can use beanstalkd or other options).
Currently the agent requires cron jobs for processing builds and releases.
"Pending" jobs are read from the database by the agent it will immediately start all pending jobs. We need a better way to process jobs, a method that uses queues and allows throttling or capacity management.
Eventually I'd like the agent to not need direct db access so that is something to consider.