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 wait_for_memcached #260

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add wait_for_memcached #260

wants to merge 1 commit into from

Conversation

capvor
Copy link

@capvor capvor commented Aug 15, 2021

If the seafile container is started before the memcached container, some error message will be generated in seahub.log.
To avoid this situation, wait for memcached to start before seahub starts.

def wait_for_memcached():
while True:
try:
with telnetlib.Telnet(host='memcached', port=11211, timeout=3) as tn:

Choose a reason for hiding this comment

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

Hello!
I came here to have a look at the memcached configuration options.
As far as I see it, there is no MEMCACHED_HOST environment variable, but I guess one day there might be one.

Making this MR future-proof, one could already now add it here.

As the default value would be used when no configuration is provided, I only see this as saving some work when adding the memcached config later.

host=get_conf('MEMCACHED_HOST', 'memcached')

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.

2 participants