diff --git a/CHANGELOG.md b/CHANGELOG.md index c5951d57..b965072f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ -# Unreleased +# 1.6.8 * server: ErrorHandler now supports finding of handlers using exception super classes +* jobs: fix deprecated schedule() method implementation # 1.6.7 * core: Converter can now force initialize type arguments' companion objects diff --git a/jobs/src/JobRunner.kt b/jobs/src/JobRunner.kt index cfacfa1f..6cd1773a 100644 --- a/jobs/src/JobRunner.kt +++ b/jobs/src/JobRunner.kt @@ -81,8 +81,8 @@ open class JobRunner( open fun runOnce(job: Job) = workerPool.submit { runInTransaction(job, UNDISPATCHED) } - @Deprecated("Use version with Duration parameters instead", ReplaceWith("schedule(job, period.milliseconds, delay.milliseconds)")) - open fun schedule(job: Job, delay: Long, period: Long, unit: TimeUnit) = schedule(job, period.milliseconds, delay.milliseconds) + @Deprecated("Use version with Duration parameters instead", ReplaceWith("schedule(job, period.seconds, delay.seconds)")) + open fun schedule(job: Job, delay: Long, period: Long, unit: TimeUnit) = schedule(job, unit.toMillis(period).milliseconds, unit.toMillis(delay).milliseconds) open fun schedule(job: Job, period: Duration, delay: Duration = period) { val startAt = LocalDateTime.now().plus(delay.toJavaDuration()).truncatedTo(ChronoUnit.SECONDS)