Skip to content

Commit

Permalink
Remove message handling from the loadTracklogs module
Browse files Browse the repository at this point in the history
  • Loading branch information
M4rtinK committed Jan 2, 2022
1 parent 4f4498e commit 9905f78
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions modules/mod_loadTracklogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,40 +49,6 @@ def __init__(self, *args, **kwargs):
def firstTime(self):
self._create_basic_folder_structure()

def handleMessage(self, message, messageType, args):
if message == 'loadActive':
# load the active tracklog
path = self.get('activeTracklogPath', None)
if path is not None and self._tracklog_list:
self.log.info("* loading tracklog:\n%s", path)

# Zeroth, is the tracklog already loaded ?
if path not in self.tracklogs.keys():
# First, is the cache loaded ?
if self.cache == {}:
self._load_cache()
else:
self.log.warning("not loading tracklog cache (already loaded)")
# Second, try to load the tracklog (if its not loaded)

try:
self.load_tracklog(path)
self.log.info("tracklog successfully loaded")
except Exception:
self.log.exception("loading tracklog from path: %s failed", path)

# Third, assure consistency of the cache
self.log.info("** Assuring tracklog cache consistency")
self.save()
self._clean_cache()
self.log.info("** Tracklog cache consistency assured")
# elif message == 'renameActiveTracklog':
# activeTracklog = self.get_active_tracklog()
# if activeTracklog:
# pass
# # get current tracklog filename, sans extension
# # start an entry box

def _get_tf_sub_path(self, subPath):
"""Return a tracklog folder sub path.
Expand Down

0 comments on commit 9905f78

Please sign in to comment.