mirror of
https://github.com/InsanusMokrassar/krontab.git
synced 2024-11-22 16:23:55 +00:00
add CronDateTimeSchedulerTz variant in CollectionKronScheduler
This commit is contained in:
parent
5844859369
commit
5c81eede9c
@ -39,6 +39,18 @@ data class CollectionKronScheduler internal constructor(
|
||||
mergeCronDateTimeSchedulers(resultCronDateTimes)
|
||||
)
|
||||
}
|
||||
is CronDateTimeSchedulerTz -> {
|
||||
val newCronDateTimes = kronScheduler.cronDateTimes.toMutableList()
|
||||
val cronDateTimes = schedulers.removeAll {
|
||||
if (it is CronDateTimeSchedulerTz && it.offset == kronScheduler.offset) {
|
||||
newCronDateTimes.addAll(it.cronDateTimes)
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
schedulers.add(CronDateTimeSchedulerTz(newCronDateTimes.toList(), kronScheduler.offset))
|
||||
}
|
||||
is CollectionKronScheduler -> kronScheduler.schedulers.forEach {
|
||||
include(it)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user