I have added 'loop' command in --daemon option which run daemon in foreground, this simple change enable us to run dynamic-dynamodb with supervisord.
dynamic-dynamodb -c example.conf --instance example --daemon loop
sample supervisor conf
command=/usr/local/bin/dynamic-dynamodb -c /path/to/example.conf --instance example --daemon loop
adding loop command which run daemon in foreground, which enable us t…
…o run dynamic-dynamodb using supervisord
correcting module imports
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.
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.
Moved --loop option to own parameter. #66 #67
Changed daemon mode name to "foreground" or "fg". #66 #67
Updated cmd line help text. #66 #67
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.