Skip to content
Snippets Groups Projects
Commit edf7ddb7 authored by David Trattnig's avatar David Trattnig
Browse files

Simplified logging in case of admin mail.

parent 7157d90a
No related branches found
No related tags found
No related merge requests found
...@@ -126,8 +126,8 @@ class FallbackManager: ...@@ -126,8 +126,8 @@ class FallbackManager:
file = "" file = ""
self.logger.critical("Should set next fallback file for " + fallbackname + ", but this fallback is unknown!") self.logger.critical("Should set next fallback file for " + fallbackname + ", but this fallback is unknown!")
# Send admin email to notify about the fallback state
if file: if file:
# Send admin email to notify about the fallback state
if not active_playlist: if not active_playlist:
active_playlist = "n/a" active_playlist = "n/a"
msg = "AURA ENGINE %s FALLBACK DETECTED!\n\n" % fallbackname msg = "AURA ENGINE %s FALLBACK DETECTED!\n\n" % fallbackname
...@@ -136,13 +136,20 @@ class FallbackManager: ...@@ -136,13 +136,20 @@ class FallbackManager:
msg += "Providing FALLBACK-%s for %s '%s'\n\n" % (media_type, fallbackname, file) msg += "Providing FALLBACK-%s for %s '%s'\n\n" % (media_type, fallbackname, file)
msg += "Please review the schedules or contact your Aura Engine administrator." msg += "Please review the schedules or contact your Aura Engine administrator."
self.mailer.send_admin_mail("CRITICAL - Detected fallback for %s" % fallbackname, msg) self.mailer.send_admin_mail("CRITICAL - Detected fallback for %s" % fallbackname, msg)
self.logger.critical("Sent admin email:\n──────────────────────────────────────\n" + msg) self.logger.warn("Providing fallback %s: '%s'. Sent admin email about fallback state" % (media_type, file))
self.is_processing = False self.is_processing = False
return file return file
def fallback_has_started(self, artist, title):
"""
Called when a fallback track has actually started playing
"""
self.logger.info("Now playing: fallback track '%s - %s'." % (artist, title))
# #
# PRIVATE METHODS # PRIVATE METHODS
# #
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment