Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid sleeping after first execution #152

Closed
aulisse opened this issue May 8, 2014 · 3 comments
Closed

Avoid sleeping after first execution #152

aulisse opened this issue May 8, 2014 · 3 comments

Comments

@aulisse
Copy link

aulisse commented May 8, 2014

Hello, a quick question: is it possible to make dynamic-dynamodb stop after the first execution? In other words, is there any configuration, or anything that I can do, to make the python process stop after the first loop on the tables matching the table section?

I am not running the script through a daemon.

Thanks!

@sebdah sebdah self-assigned this May 8, 2014
@sebdah sebdah added this to the 1.13.x milestone May 8, 2014
@sebdah
Copy link
Owner

sebdah commented May 8, 2014

It is currently not supported. But I am about to release a new version of dynamic-dynamodb. I will include a command line option (--run-once) that will trigger that behaviour.

@sebdah
Copy link
Owner

sebdah commented May 8, 2014

1.13.0 is out now, including this change!

@aulisse
Copy link
Author

aulisse commented May 8, 2014

Thanks! Perfectly working!

I need the "--run-once" option because I run the script in a Java application running in an autoscaling group that has ~8 EC2 instances, and I don't want that it runs on each server, but exactly on one, by specifying a cron expression.

I exploit the optimistic locking of Dynamo DB, combined with ntp synchronization and a cron expression, in order to run the script exactly on one random active node from inside a java job. Thus, I don't have any single point of failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants