mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-21 18:08:25 +00:00
Refresh item after addon is done
This commit is contained in:
@ -10,7 +10,7 @@ import docspell.common._
|
||||
import docspell.pubsub.api.{Topic, TypedTopic}
|
||||
|
||||
import io.circe.generic.semiauto.{deriveDecoder, deriveEncoder}
|
||||
import io.circe.{Decoder, Encoder}
|
||||
import io.circe.{Decoder, Encoder, Json}
|
||||
|
||||
/** Message to notify about finished jobs. They have a final state. */
|
||||
final case class JobDone(
|
||||
@ -18,7 +18,8 @@ final case class JobDone(
|
||||
group: Ident,
|
||||
task: Ident,
|
||||
args: String,
|
||||
state: JobState
|
||||
state: JobState,
|
||||
result: Option[Json]
|
||||
)
|
||||
object JobDone {
|
||||
implicit val jsonDecoder: Decoder[JobDone] =
|
||||
|
@ -231,7 +231,7 @@ final class SchedulerImpl[F[_]: Async](
|
||||
_ <- Sync[F].whenA(JobState.isDone(finishState))(
|
||||
pubSub.publish1IgnoreErrors(
|
||||
JobDone.topic,
|
||||
JobDone(job.id, job.group, job.task, job.args, finishState)
|
||||
JobDone(job.id, job.group, job.task, job.args, finishState, result.json)
|
||||
)
|
||||
)
|
||||
_ <- Sync[F].whenA(JobState.isDone(finishState))(
|
||||
|
Reference in New Issue
Block a user