zf-fr / zfr-eb-worker

ZfrEbWorker is a thin layer to simplify the usage of SQS queues and Elastic Beanstalk environments
MIT License
8 stars 2 forks source link

Create a worker for development #19

Closed bakura10 closed 8 years ago

bakura10 commented 8 years ago

Currently, ZfrEbWorker makes it very easy to work with Beanstalk worker, but it does not have any way to easily pull messages locally for development.

I'd suggest that we add a CLI command - maybe Symfony CLI ? - (ideally that could be launched using something like "composer eb-worker", although I'm not sure about how to do that).

It should accept two options:

So it would be launched like this: composer eb-worker --server localhost:8000 --queue my-sqs-queue

The command will:

We can introduce GuzzleHttp dependency as a dev-dependancy to make the HTTP call. We must make sure to add all the required headers that Beanstalk add by default (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features-managing-env-tiers.html#worker-environ).

@danizord could you do that one?

bakura10 commented 8 years ago

For reference about how we could use that: https://xtreamwayz.com/blog/2016-02-07-zend-expressive-console-cli-commands

bakura10 commented 8 years ago

I'm taking it :).

bakura10 commented 8 years ago

Addressed by https://github.com/zf-fr/zfr-eb-worker/pull/20