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
95239394
Commit
95239394
authored
4 years ago
by
David Trattnig
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup.
parent
c6c1ebf5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/scheduling/scheduler.py
+0
-113
0 additions, 113 deletions
modules/scheduling/scheduler.py
with
0 additions
and
113 deletions
modules/scheduling/scheduler.py
+
0
−
113
View file @
95239394
...
...
@@ -705,109 +705,6 @@ class AuraScheduler(ExceptionLogger, threading.Thread):
# FIXME Still needed?
# def enable_entries(self, playlist):
# """
# Iterates over all playlist entries and assigs their start time.
# Additionally timers for fadings are created.
# Args:
# playlist(Playlist): The playlist to be scheduled for playout
# """
# now_unix = time.mktime(datetime.datetime.now().timetuple())
# time_marker = playlist.start_unix
# # Old entry for fading out
# # FIXME retrieve active entry from previous playlist
# old_entry = None
# for entry in playlist.entries:
# diff=3
# entry.start_unix = time_marker
# self.enable_timer(diff, entry, old_entry)
# old_entry = entry
# # time_marker += 1 # FIXME ???
# # # Since we also get entries from the past, filter these out
# # if time_marker > now_unix:
# # # when do we have to start?
# # diff = time_marker - now_unix
# # diff = 3 # FIXME test
# # entry.start_unix = time_marker
# # # enable the three timer
# # self.enable_timer(diff, entry, old_entry)
# # old_entry = entry
# # ------------------------------------------------------------------------------------------ #
# def enable_timer(self, diff, entry, old_entry):
# """
# Create threads to send track-activation messages to LiquidSoap.
# Those tracks can be delayed by `diff` seconds.
# Args:
# diff (Integer): seconds after tracks should be activated
# """
# self.logger.critical("ENABLING SWITCHTIMER FOR " + str(entry))
# entry.switchtimer = self.add_or_update_timer(diff, self.soundsystem.play, [entry])
# # FIXME Fade In/Out logic: Not sure if that's functional
# #self.enable_fading(diff, entry, old_entry)
# ------------------------------------------------------------------------------------------ #
# def enable_fading(self, diff, new_entry, old_entry):
# # fading times
# fade_out_time = float(self.config.get("fade_out_time"))
# # enable fading when entry types are different
# if old_entry is not None:
# if old_entry.type != new_entry.type:
# #self.add_or_update_timer(diff, self.soundsystem.fade_out, [old_entry])
# old_entry.fadeouttimer = self.create_timer(diff-fade_out_time, self.soundsystem.fade_out, [old_entry], fadeout=True)
# self.logger.critical("ENABLING FADEOUTTIMER FOR " + str(old_entry))
# # same for fadein except old_entry can be None
# else:
# #self.add_or_update_timer(diff, self.soundsystem.fade_in, [new_entry])
# new_entry.fadeintimer = self.create_timer(diff, self.soundsystem.fade_in, [new_entry], fadein=True)
# self.logger.critical("ENABLING FADEINTIMER FOR " + str(new_entry))
# ------------------------------------------------------------------------------------------ #
# def add_or_update_timer(self, diff, func, parameters):
# timer = None
# entry = parameters[0]
# planned_timer = self.is_something_planned_at_time(entry.start_unix)
# # if something is planned on entry.entry_start
# #FIXME
# #if 1==0:
# if planned_timer:
# planned_entry = planned_timer.entry
# # check if the playlist_id's are different
# if planned_entry.playlist.playlist_id != entry.playlist.playlist_id:
# # if not stop the old timer and remove it from the list
# self.stop_timer(planned_timer)
# # and create a new one
# timer = self.create_timer(diff, func, parameters, switcher=True)
# # if the playlist id's do not differ => reuse the old timer and do nothing, they are the same
# # if nothing is planned at given time, create a new timer
# else:
# timer = self.create_timer(diff, func, parameters, switcher=True)
# if timer is None:
# return planned_timer
# return timer
def
is_something_planned_at_time
(
self
,
given_time
):
"""
Checks for existing timers at the given time.
...
...
@@ -862,16 +759,6 @@ class AuraScheduler(ExceptionLogger, threading.Thread):
# def init_error_messages(self):
# """
# Load error messages
# """
# error_file = self.config.get("install_dir") + "/errormessages/scheduler_error.js"
# f = open(error_file)
# self.error_data = json.load(f)
# f.close()
# FIXME Move to adequate module
def
init_database
(
self
):
"""
...
...
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