Skip to content

Commit

Permalink
Merge pull request #28 from rssnyder/ignore-name
Browse files Browse the repository at this point in the history
if using nickname, ignore name job
  • Loading branch information
rssnyder authored Mar 29, 2021
2 parents a551055 + ccaa76b commit 411839e
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ def __init__(self, *args, **kwargs):
crypto_name = getenv('CRYPTO_NAME')
stock_name = getenv("STOCK_NAME", ticker)


# Check that at least a ticker is set
if not ticker:
logging.error('TICKER not set!')
Expand All @@ -34,12 +33,15 @@ def __init__(self, *args, **kwargs):
# Use different updates based on security type
if crypto_name:
logging.info('crypo ticker')
self.sm_task = self.loop.create_task(
self.crypto_update_name(
ticker.upper(),
crypto_name

if not getenv('SET_NICKNAME'):
self.sm_task = self.loop.create_task(
self.crypto_update_name(
ticker.upper(),
crypto_name
)
)
)

self.bg_task = self.loop.create_task(
self.crypto_update_activity(
ticker.upper(),
Expand All @@ -52,12 +54,15 @@ def __init__(self, *args, **kwargs):
)
else:
logging.info('stock ticker')
self.sm_task = self.loop.create_task(
self.stock_update_name(
ticker.upper(),
stock_name.upper()

if not getenv('SET_NICKNAME'):
self.sm_task = self.loop.create_task(
self.stock_update_name(
ticker.upper(),
stock_name.upper()
)
)
)

self.bg_task = self.loop.create_task(
self.stock_update_activity(
ticker.upper(),
Expand Down

0 comments on commit 411839e

Please sign in to comment.