mozart-analytics / sqsd

A simple alternative to the Amazon SQS Daemon ("sqsd") used on AWS Beanstalk worker tier instances.
MIT License
59 stars 8 forks source link

Not daemonizing when no messages #3

Closed jeffcharles closed 9 years ago

jeffcharles commented 9 years ago

Hi,

I'm trying to run this as a docker container inside a Vagrant machine. I have it pointed at a queue on an instance of zily/docker-fake-sqs running locally. The container comes up and exits very quickly.

Docker logs has the following output:

Receiving messages from http://localhost:3000/orgle
Querying SQS for messages ...
Received Messages : 0
SQSD finished successfully!

I expected the container to stay up after initializing since sqsd doesn't shut down when there aren't any messages on the queue.

Would you be open to a PR to add the ability to run this daemonized?

abdielou commented 9 years ago

Sure send the patch.

abdielou commented 9 years ago

Actually, I'm pretty sure I discussed this with @ortimanu at earlier versions and we ended up not daemonizing it. Would a cron job work for you?

jeffcharles commented 9 years ago

A cron job would not work well for me. One use case I have is provisioning it as a Docker container inside my dev virtual machine using Vagrant. Having to mess with the crontab during provisioning is a pain (at least compared to having a run daemonized option). The other use case is as part of our CI for system tests, we use CircleCI and I don't believe they expose a crontab interface at all.