mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Change job priority on queue page
This commit is contained in:
@ -231,6 +231,13 @@ object RJob {
|
||||
)
|
||||
).update.run
|
||||
|
||||
def setPriority(jobId: Ident, jobGroup: Ident, prio: Priority): ConnectionIO[Int] =
|
||||
updateRow(
|
||||
table,
|
||||
and(id.is(jobId), group.is(jobGroup), state.is(JobState.waiting)),
|
||||
priority.setTo(prio)
|
||||
).update.run
|
||||
|
||||
def getRetries(jobId: Ident): ConnectionIO[Option[Int]] =
|
||||
selectSimple(List(retries), table, id.is(jobId)).query[Int].option
|
||||
|
||||
|
Reference in New Issue
Block a user