From 78a15916c2e8bc1eb914237b17f9ce0e3af9aa5a Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Thu, 9 Aug 2012 11:32:58 -0400 Subject: [PATCH] cc-4105: added better logging for replaygain updater --- python_apps/media-monitor2/media/update/replaygainupdater.py | 3 +++ python_apps/media-monitor2/mm2.py | 1 + 2 files changed, 4 insertions(+) diff --git a/python_apps/media-monitor2/media/update/replaygainupdater.py b/python_apps/media-monitor2/media/update/replaygainupdater.py index 884b39d8c..a494d907a 100644 --- a/python_apps/media-monitor2/media/update/replaygainupdater.py +++ b/python_apps/media-monitor2/media/update/replaygainupdater.py @@ -47,6 +47,7 @@ class ReplayGainUpdater(Thread, Loggable): try: # keep getting few rows at a time for current music_dir (stor # or watched folder). + total = 0 while True: # return a list of pairs where the first value is the # file's database row id and the second value is the @@ -59,6 +60,7 @@ class ReplayGainUpdater(Thread, Loggable): self.api_client.update_replay_gain_values(processed_data) if len(files) == 0: break + self.logger.info("Processed: %d songs" % total) except Exception, e: self.logger.error(e) @@ -66,6 +68,7 @@ class ReplayGainUpdater(Thread, Loggable): def run(self): try: while True: + self.logger.info("Runnning replaygain updater") self.main() # Sleep for 5 minutes in case new files have been added time.sleep(60 * 5) diff --git a/python_apps/media-monitor2/mm2.py b/python_apps/media-monitor2/mm2.py index 494c8029c..aa6e7e6ce 100644 --- a/python_apps/media-monitor2/mm2.py +++ b/python_apps/media-monitor2/mm2.py @@ -56,6 +56,7 @@ except Exception as e: watch_syncer = WatchSyncer(signal='watch', chunking_number=config['chunking_number'], timeout=config['request_max_wait']) + ReplayGainUpdater.start_reply_gain() apiclient = apc.AirtimeApiClient.create_right_config(log=log,