Skip to content

Waiting for MongoDB? #160

Answered by pkosiec
hongkongkiwi asked this question in Q&A
Discussion options

You must be logged in to vote

What happens if the mongodb container is not ready when the seeding container is run? Will it automatically retry to seed?

Yes, exactly. You can configure the reconnect timeout by RECONNECT_TIMEOUT env variable (CLI, Docker Image) or --reconnect-timeout command line parameter (CLI). Of course the configuration property is also there in the JS library. So it will wait at most the time specified in the env variable, and it will try to reconnect every 0,5s.

See the details here: https://github.com/pkosiec/mongo-seeding/blob/master/cli/README.md#environmental-variables

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by pkosiec
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #160 on March 21, 2021 18:54.