mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Allow background tasks return results that are included in the event
This commit is contained in:
@ -54,6 +54,9 @@ object JobState {
|
||||
NonEmptyList.of(Waiting, Scheduled, Running, Stuck)
|
||||
val inProgress: Set[JobState] = Set(Scheduled, Running, Stuck)
|
||||
|
||||
def isDone(state: JobState): Boolean =
|
||||
done.exists(_ == state)
|
||||
|
||||
def parse(str: String): Either[String, JobState] =
|
||||
str.toLowerCase match {
|
||||
case "waiting" => Right(Waiting)
|
||||
|
Reference in New Issue
Block a user