Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
aura-engine
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Kruse
aura-engine
Commits
edf7ddb7
Commit
edf7ddb7
authored
5 years ago
by
David Trattnig
Browse files
Options
Downloads
Patches
Plain Diff
Simplified logging in case of admin mail.
parent
7157d90a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/scheduling/fallback_manager.py
+9
-2
9 additions, 2 deletions
modules/scheduling/fallback_manager.py
with
9 additions
and
2 deletions
modules/scheduling/fallback_manager.py
+
9
−
2
View file @
edf7ddb7
...
...
@@ -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
#
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment