Skip to content

Commit

Permalink
Merge PR #31 from DM-16021-16022-14659-jupyter
Browse files Browse the repository at this point in the history
DM-16021-16022-14659 firefly_client now work new lab channel system
  • Loading branch information
robyww authored Nov 1, 2018
2 parents e89b116 + 35a8e83 commit d54bf39
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions firefly_client/firefly_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@

_my_localurl = 'http://localhost:8080/firefly'

if 'FIREFLY_URL' in os.environ:
if 'fireflyLabExtension' in os.environ:
_my_url = os.environ['fireflyURLLab']
elif 'FIREFLY_URL' in os.environ:
_my_url = os.environ['FIREFLY_URL']
else:
_my_url = _my_localurl
Expand Down Expand Up @@ -128,7 +130,10 @@ def __init__(self, url=_my_url, channel=None, html_file=_my_html_file,

# auto-generate unique channel if not provided
if channel is None:
channel = str(uuid.uuid1())
if 'fireflyLabExtension' in os.environ:
channel = os.environ['fireflyChannelLab']
else:
channel = str(uuid.uuid1())

# websocket url
ws_url = '%s://%s/sticky/firefly/events' % (wsproto, location) # web socket url
Expand Down

0 comments on commit d54bf39

Please sign in to comment.