Skip to content

Commit aea839d

Browse files
authored
check worker.api_url before setting (#230)
1 parent 57f5a64 commit aea839d

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

server/dive_server/__init__.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,11 @@ def load(self, info):
9696
)
9797

9898
plugin.getPlugin('worker').load(info)
99-
Setting().set(
100-
'worker.api_url',
101-
os.environ.get('WORKER_API_URL', 'http://girder:8080/api/v1'),
102-
)
99+
if not Setting().get('worker.api_url'):
100+
Setting().set(
101+
'worker.api_url',
102+
os.environ.get('WORKER_API_URL', 'http://girder:8080/api/v1'),
103+
)
103104

104105
broker_url = os.environ.get('CELERY_BROKER_URL', 'amqp://guest:guest@rabbitmq')
105106
if broker_url is None:

0 commit comments

Comments
 (0)