Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
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
Container registry
Model registry
Operate
Environments
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
AURA
engine
Commits
5f61a1f5
Verified
Commit
5f61a1f5
authored
6 months ago
by
Ole Binder
Browse files
Options
Downloads
Patches
Plain Diff
Feat: improve exception handling
parent
ca41d3d1
No related branches found
No related tags found
1 merge request
!46
Steering playout schema and virtual timeslot integration
Pipeline
#8609
passed
6 months ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/aura_engine/scheduling/timetable.py
+14
-1
14 additions, 1 deletion
src/aura_engine/scheduling/timetable.py
with
14 additions
and
1 deletion
src/aura_engine/scheduling/timetable.py
+
14
−
1
View file @
5f61a1f5
...
...
@@ -125,12 +125,25 @@ class TimetableService:
"""
Stores the current timetable to the local JSON file used for caching.
"""
if
self
.
timetable_file
is
None
:
self
.
logger
.
error
(
SU
.
red
(
"
No timetable file specified.
"
))
return
# Ensure the directory exists
os
.
makedirs
(
os
.
path
.
dirname
(
self
.
timetable_file
),
exist_ok
=
True
)
try
:
with
open
(
self
.
timetable_file
,
"
w
"
)
as
file
:
file
.
write
(
jsonpickle
.
encode
(
self
.
timetable
,
unpicklable
=
self
.
restorable
))
self
.
logger
.
info
(
SU
.
green
(
"
timetable.json stored
"
))
except
FileNotFoundError
as
fnf_error
:
self
.
logger
.
error
(
SU
.
red
(
f
"
File not found:
{
self
.
timetable_file
}
.
{
fnf_error
}
"
))
except
PermissionError
as
perm_error
:
self
.
logger
.
error
(
SU
.
red
(
f
"
Permission denied for file:
{
self
.
timetable_file
}
.
{
perm_error
}
"
)
)
except
Exception
as
e
:
self
.
logger
.
error
(
SU
.
red
(
f
"
E
rror while storing
{
self
.
timetable_file
}
"
),
e
)
self
.
logger
.
error
(
SU
.
red
(
f
"
Unexpected e
rror while storing
{
self
.
timetable_file
}
:
{
e
}
"
)
)
def
get_current_item
(
self
)
->
PlaylistItem
|
None
:
"""
...
...
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