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:
file = ""
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:
# Send admin email to notify about the fallback state
if not active_playlist:
active_playlist = "n/a"
msg = "AURA ENGINE %s FALLBACK DETECTED!\n\n" % fallbackname
......@@ -136,13 +136,20 @@ class FallbackManager:
msg += "Providing FALLBACK-%s for %s '%s'\n\n" % (media_type, fallbackname, file)
msg += "Please review the schedules or contact your Aura Engine administrator."
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
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
#
......
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