Allow to run multiple instances in parallel #37

Closed
DDani opened this Issue Apr 30, 2013 · 5 comments

Projects

None yet

2 participants

@DDani
DDani commented Apr 30, 2013

Hi,
currently when dynamic-dynamodb starts in daemon mode, it creates a pid file on this location:
daemon = DynamicDynamoDBDaemon('/tmp/dynamic-dynamodb.pid')

Since this is harcoded, it is not possible to run multiple instances od dynamic-dynamodb.

Regards,

@sebdah sebdah was assigned Apr 30, 2013
@sebdah
Owner
sebdah commented Apr 30, 2013

Perfect, thanks. I should have thought about that. Will look into it.

@sebdah
Owner
sebdah commented Apr 30, 2013

I have been looking into the code slightly. I am thinking about implementing a --instance / --instance-name flag as a command line option. The flag should be set differently to control different daemons. If the flag is optional and if it is not set Dynamic DynamoDB will control the default daemon only.

Will think a bit more about it. But the implementation is quite straight forward.

@DDani
DDani commented Apr 30, 2013

I like this approach, much better than the one I was adding just know (by adding a --pid-file-name arg).

@sebdah
Owner
sebdah commented May 1, 2013

This has been implemented and the name of the daemon instances are set using the --instance flag. If the flag is not set it defaults to a default daemon name.

Thanks for the feedback @DDani !

@sebdah sebdah closed this May 1, 2013
@sebdah
Owner
sebdah commented May 1, 2013

FYI, Dynamic DynamoDB 1.3.0 has been released to PyPI. You can upgrade to the latest version with pip install -U dynamic-dynamodb

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