Skip to content

Commit

Permalink
Log last scheduled date when starting JobScheduler service (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler authored Oct 24, 2024
1 parent 0412c4e commit b9288b2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/Jobs/Scheduler/JobSchedule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ public struct JobSchedule: MutableCollection, Sendable {
// Update next scheduled date for each job schedule based off the last scheduled date stored
do {
if let date = try await self.jobQueue.getMetadata(.jobScheduleLastDate) {
self.jobQueue.logger.debug("Last scheduled date \(date).")
for index in 0..<jobSchedule.count {
jobSchedule[index].nextScheduledDate = jobSchedule[index].schedule.setInitialNextDate(after: date) ?? .distantFuture
}
Expand Down

0 comments on commit b9288b2

Please sign in to comment.