Skip to content

Add wait_for_memcached - #260

Open
capvor wants to merge 1 commit into
haiwen:masterfrom
capvor:master
Open

Add wait_for_memcached#260
capvor wants to merge 1 commit into
haiwen:masterfrom
capvor:master

Conversation

@capvor

@capvor capvor commented Aug 15, 2021

Copy link
Copy Markdown

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.

Comment thread scripts_8.0/utils.py
def wait_for_memcached():
while True:
try:
with telnetlib.Telnet(host='memcached', port=11211, timeout=3) as tn:

Copy link
Copy Markdown

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