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")
|
@Suppress("SuspendFunWithFlowReturnType")
|
||||||
override suspend fun findNext(names: Set<String>, status: Set<JobStatus>, limit: Int): Flow<ScheduledJob> {
|
override suspend fun findNext(names: Set<String>, status: Set<JobStatus>, limit: Int): Flow<ScheduledJob> {
|
||||||
return query {
|
return query {
|
||||||
jobs.selectAll(
|
jobs.selectAll().where(
|
||||||
).where(
|
|
||||||
jobs.status.inList(list = status.map { it.name })
|
jobs.status.inList(list = status.map { it.name })
|
||||||
.and(if (names.isEmpty()) Op.TRUE else jobs.name.inList(names))
|
.and(if (names.isEmpty()) Op.TRUE else jobs.name.inList(names))
|
||||||
).limit(limit)
|
).limit(limit)
|
||||||
|
|
Loading…
Reference in New Issue