mirror of https://github.com/usbharu/Hideout.git
Update src/main/kotlin/dev/usbharu/hideout/core/infrastructure/kjobexposed/ExposedJobRepository.kt
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
93266c1d35
commit
fe3efc5fbf
|
@ -92,8 +92,7 @@ class ExposedJobRepository(
|
|||
@Suppress("SuspendFunWithFlowReturnType")
|
||||
override suspend fun findNext(names: Set<String>, status: Set<JobStatus>, limit: Int): Flow<ScheduledJob> {
|
||||
return query {
|
||||
jobs.selectAll(
|
||||
).where(
|
||||
jobs.selectAll().where(
|
||||
jobs.status.inList(list = status.map { it.name })
|
||||
.and(if (names.isEmpty()) Op.TRUE else jobs.name.inList(names))
|
||||
).limit(limit)
|
||||
|
|
Loading…
Reference in New Issue