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

Add optional timeout #1081

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

shintasmith
Copy link

This PR adds the ability to specify timeout for the wait before running pubsubc, via an optional PUBSUB_EMULATOR_WAIT_TIMEOUT environment variable.

The value of this environment variable is passed on to the /usr/bin/wait-for

This is added to resolve the issue where Google PubSub system takes more than 15s (default timeout for /usr/bin/wait-for) to be ready.

@@ -5,9 +5,12 @@
# After it's done, port 8682 will be open to facilitate the wait-for and
# wait-for-it scripts.
(
set -eu
Copy link
Author

@shintasmith shintasmith Oct 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to get rid of this setting because the script will terminate if PUBSUB_EMULATOR_WAIT_TIMEOUT is not defined. I would get the following error:

/run.sh: 11: PUBSUB_EMULATOR_WAIT_TIMEOUT: parameter not set

I was trying to make this new env variable optional so that the behavior is the same as before (it waits only 15s), if the variable is not specified

@shintasmith
Copy link
Author

@TheKevJames would you mind reviewing and merging in? Thanks 😊

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

Successfully merging this pull request may close these issues.

1 participant