Feature/foreground loop fixing Issue #66 #67

Closed
wants to merge 2 commits into
from

Projects

None yet

2 participants

@pragnesh
Contributor

I have added 'loop' command in --daemon option which run daemon in foreground, this simple change enable us to run dynamic-dynamodb with supervisord.

for ex.

dynamic-dynamodb -c example.conf --instance example --daemon loop

sample supervisor conf

[program:example]
command=/usr/local/bin/dynamic-dynamodb -c /path/to/example.conf --instance example --daemon loop
autostart=true
autorestart=true
startsecs=10
redirect_stderr=true

pragnesh added some commits Oct 16, 2013
@sebdah
Owner
sebdah commented Oct 17, 2013

Thanks for the PR @pragnesh. I will have a closer look at it later today.

Just wonder about 3c78060, have you seen any issues with those imports? They were corrected due to pylint complains.

@sebdah sebdah was assigned Oct 17, 2013
@pragnesh
Contributor

sometime dynamic-dynamodb daemon crashed because dynamo table is just deleted which it has read just few second earliier and now it tried to update table throughput.

Also sometime due to some bug dynamic-dynamodb also crashed, i want it to restarted automatically in those case. But the way Deamon written it is not allowing to work with supervisord, so i made this change.

With regard to those imports, it is not working correctly on ubuntu precise 12.04 in original form, i am getting error that config module not found, after 3c78060 change that started working.

@sebdah sebdah added a commit that referenced this pull request Oct 17, 2013
@sebdah Moved --loop option to own parameter. #66 #67 baa61e6
@sebdah sebdah added a commit that referenced this pull request Oct 17, 2013
@sebdah Updated cmd line help text. #66 #67 1077ca4
@sebdah
Owner
sebdah commented Oct 17, 2013

I thought a bit around this and came to the conclusion that loop is part of the definition of the daemon already. So it made more sense to call the option foreground or fg for short. So you will call this mode using --daemon foreground or --daemon fg.

@sebdah sebdah closed this Oct 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment