mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Use job group instead of parsing the task arguments
This commit is contained in:
@ -8,10 +8,8 @@ package docspell.restserver
|
||||
|
||||
import fs2.Stream
|
||||
import fs2.concurrent.Topic
|
||||
|
||||
import docspell.backend.msg.JobDone
|
||||
import docspell.common._
|
||||
import docspell.common.syntax.StringSyntax._
|
||||
import docspell.common.ProcessItemArgs
|
||||
import docspell.pubsub.api.PubSubT
|
||||
import docspell.restserver.ws.OutputEvent
|
||||
|
||||
@ -29,7 +27,5 @@ object Subscriptions {
|
||||
pubSub
|
||||
.subscribe(JobDone.topic)
|
||||
.filter(m => m.body.task == ProcessItemArgs.taskName)
|
||||
.map(m => m.body.args.parseJsonAs[ProcessItemArgs])
|
||||
.collect { case Right(a) => OutputEvent.ItemProcessed(a.meta.collective) }
|
||||
|
||||
.map(m => OutputEvent.ItemProcessed(m.body.group))
|
||||
}
|
||||
|
Reference in New Issue
Block a user