Skip to content

Commit

Permalink
fix dependencies
Browse files Browse the repository at this point in the history
- kombu relies on deprecated importlib metadata,
celery/kombu#1601
- pass along qualifier to apphub when set
  • Loading branch information
miraculixx committed Oct 4, 2022
1 parent f654d7d commit e6c80d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions omegaml/client/cli/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,13 +412,15 @@ def restart(self):
name = self.args.get('<name>')
insecure = self.args.get('--insecure', False)
user = om.runtime.auth.userid
qualifier = om.runtime.auth.qualifier
auth = requests.auth.HTTPBasicAuth(user, om.runtime.auth.apikey)
headers = {'Qualifier': qualifier}
parsed = urlparse(om.defaults.OMEGA_MONGO_URL)
url = f'https://{parsed.hostname}'
stop = requests.get(f'{url}/apps/api/stop/{user}/{name}'.format(om.runtime.auth.userid),
auth=auth, verify=not insecure)
auth=auth, verify=not insecure, headers=headers)
start = requests.get(f'{url}/apps/api/start/{user}/{name}'.format(om.runtime.auth.userid),
auth=auth, verify=not insecure)
auth=auth, verify=not insecure, headers=headers)
self.logger.info(f'stop: {stop} start: {start}')

def serve(self):
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
],
install_requires=[
'celery>4.4,<5.0',
'importlib-metadata<5.0', # due to https://github.com/celery/kombu/pull/1601
'joblib>=0.9.4',
'jupyter-client>=4.1.1',
'mongoengine~=0.24.1',
Expand Down

0 comments on commit e6c80d4

Please sign in to comment.