Skip to content

Commit

Permalink
Cleanup skill init
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed Apr 4, 2024
1 parent c0fe17c commit 7c97196
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ def __init__(self, **kwargs):
"blue frog energy drink": "blu frog energy drink"
}

self.default_intent_timeout = 60
self.from_caffeine_wiz = list()
self.from_caffeine_informer = list()
self._update_event = Event()

tdelta = datetime.datetime.now() - self.last_updated if \
Expand All @@ -92,6 +89,8 @@ def __init__(self, **kwargs):
not self.file_system.exists(
'drinkList_from_caffeine_wiz.txt'))):
LOG.info("Updating Caffeine data")
self.from_caffeine_wiz = list()
self.from_caffeine_informer = list()
# starting a separate process because this might take some time
Thread(target=self._get_new_info, daemon=True).start()
else:
Expand Down Expand Up @@ -339,7 +338,7 @@ def _add_more_caffeine_data(self):
invalid_entry = ["beverage", "quantity (oz)", "caffeine content (mg)"]
if invalid_entry in self.from_caffeine_wiz:
self.from_caffeine_wiz.remove(invalid_entry)
sorted(self.from_caffeine_wiz)
self.from_caffeine_wiz.sort()

def _get_new_info(self, reply=False):
"""fetches and combines new data from the two caffeine sources"""
Expand Down

0 comments on commit 7c97196

Please sign in to comment.