You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gabriel Teles edited this page Sep 18, 2017
·
2 revisions
# frozen_string_literal: truemoduleKronosmoduleStorageclassTemplatedefreports# Returns all previous Kronos::Report that were saved using #register_report enddefscheduled_tasks# Returns all current Kronos::ScheduledTask, resolved or pending enddefschedule(scheduled_task)# Removes any Kronos::ScheduledTask with same task ID and saves the one in parameterenddefregister_report(report)# Removes any Kronos::Report with same task ID and saves the one in parameterenddefpending?(task)# Checks if task has any pending scheduled task (where scheduled_task.next_run > Time.now)enddefresolved_tasks# Returns a list of task ids that where resolved (where scheduled_task.next_run <= Time.now)enddefremove(task_id)# Removes scheduled tasks with task_idenddefremove_reports_for(id)# Removes reports with task_idendendendend