|
@@ -48,8 +48,8 @@ class TaskScheduler {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func rescheduleTask(id: TaskID, to newRunDate: Date) {
|
|
func rescheduleTask(id: TaskID, to newRunDate: Date) {
|
|
|
- //let timeString = self.formatTime(newRunDate)
|
|
|
|
|
- //LogManager.shared.log(category: .taskScheduler, message: "Reschedule Task \(id): next run = \(timeString)", isDebug: true)
|
|
|
|
|
|
|
+ let timeString = self.formatTime(newRunDate)
|
|
|
|
|
+ LogManager.shared.log(category: .taskScheduler, message: "Reschedule Task \(id): next run = \(timeString)", isDebug: true)
|
|
|
|
|
|
|
|
queue.async {
|
|
queue.async {
|
|
|
guard var existingTask = self.tasks[id] else {
|
|
guard var existingTask = self.tasks[id] else {
|
|
@@ -124,7 +124,7 @@ class TaskScheduler {
|
|
|
updatedTask.nextRun = .distantFuture
|
|
updatedTask.nextRun = .distantFuture
|
|
|
tasks[taskID] = updatedTask
|
|
tasks[taskID] = updatedTask
|
|
|
|
|
|
|
|
- //LogManager.shared.log(category: .taskScheduler, message: "Executing task \(taskID)", isDebug: true)
|
|
|
|
|
|
|
+ LogManager.shared.log(category: .taskScheduler, message: "Executing task \(taskID)", isDebug: true)
|
|
|
|
|
|
|
|
DispatchQueue.main.async {
|
|
DispatchQueue.main.async {
|
|
|
task.action()
|
|
task.action()
|