mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 10:28:27 +00:00
Adopt backend to collective-id
This commit is contained in:
@ -39,14 +39,14 @@ object QUserTask {
|
||||
): F[RPeriodicTask] =
|
||||
QUserTask
|
||||
.create[F](
|
||||
ut.enabled,
|
||||
scope,
|
||||
ut.name,
|
||||
ut.args,
|
||||
subject.getOrElse(s"${scope.fold(_.user.id, _.id)}: ${ut.name.id}"),
|
||||
Priority.Low,
|
||||
ut.timer,
|
||||
ut.summary
|
||||
enabled = ut.enabled,
|
||||
scope = scope,
|
||||
task = ut.name,
|
||||
args = ut.args,
|
||||
subject = subject.getOrElse(s"${scope.toAccountId.asString}: ${ut.name.id}"),
|
||||
priority = Priority.Low,
|
||||
timer = ut.timer,
|
||||
summary = ut.summary
|
||||
)
|
||||
.map(r => r.copy(id = ut.id))
|
||||
}
|
||||
@ -151,24 +151,24 @@ object QUserTask {
|
||||
.current[F]
|
||||
.map { now =>
|
||||
RPeriodicTask(
|
||||
id,
|
||||
enabled,
|
||||
task,
|
||||
scope.collective,
|
||||
args,
|
||||
subject,
|
||||
scope.fold(_.user, identity),
|
||||
priority,
|
||||
None,
|
||||
None,
|
||||
timer,
|
||||
timer
|
||||
id = id,
|
||||
enabled = enabled,
|
||||
task = task,
|
||||
group = scope.toAccountId.collective,
|
||||
args = args,
|
||||
subject = subject,
|
||||
submitter = scope.toAccountId.user,
|
||||
priority = priority,
|
||||
worker = None,
|
||||
marked = None,
|
||||
timer = timer,
|
||||
nextrun = timer
|
||||
.nextElapse(now.atZone(Timestamp.UTC))
|
||||
.map(_.toInstant)
|
||||
.map(Timestamp.apply)
|
||||
.getOrElse(Timestamp.Epoch),
|
||||
now,
|
||||
summary
|
||||
created = now,
|
||||
summary = summary
|
||||
)
|
||||
}
|
||||
)
|
||||
|
@ -39,6 +39,7 @@ case class SchedulerModuleBuilder[F[_]: Async] private (
|
||||
schedulerR <- schedulerBuilder
|
||||
.withPubSub(jobStoreModule.pubSubT)
|
||||
.withEventSink(jobStoreModule.eventSink)
|
||||
.withFindJobOwner(jobStoreModule.findJobOwner)
|
||||
.withQueue(queue)
|
||||
.resource
|
||||
|
||||
|
Reference in New Issue
Block a user