mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-04-04 18:39:33 +00:00
Add a flag to processing task to distinguish re-/processing
This commit is contained in:
parent
76f5ab6c68
commit
a7ee0aa08b
@ -145,7 +145,8 @@ object OUpload {
|
||||
data.meta.validFileTypes,
|
||||
data.meta.skipDuplicates,
|
||||
data.meta.fileFilter.some,
|
||||
data.meta.tags.some
|
||||
data.meta.tags.some,
|
||||
false
|
||||
)
|
||||
args =
|
||||
if (data.multiple) files.map(f => ProcessItemArgs(meta, List(f)))
|
||||
|
@ -13,6 +13,8 @@ import io.circe.generic.semiauto._
|
||||
*
|
||||
* If the `itemId' is set to some value, the item is tried to load to
|
||||
* ammend with the given files. Otherwise a new item is created.
|
||||
*
|
||||
* It is also re-used by the 'ReProcessItem' task.
|
||||
*/
|
||||
case class ProcessItemArgs(meta: ProcessMeta, files: List[File]) {
|
||||
|
||||
@ -24,6 +26,8 @@ case class ProcessItemArgs(meta: ProcessMeta, files: List[File]) {
|
||||
case _ => s"${files.size} files from ${meta.sourceAbbrev}"
|
||||
}
|
||||
|
||||
def isNormalProcessing: Boolean =
|
||||
!meta.reprocess
|
||||
}
|
||||
|
||||
object ProcessItemArgs {
|
||||
@ -40,7 +44,8 @@ object ProcessItemArgs {
|
||||
validFileTypes: Seq[MimeType],
|
||||
skipDuplicate: Boolean,
|
||||
fileFilter: Option[Glob],
|
||||
tags: Option[List[String]]
|
||||
tags: Option[List[String]],
|
||||
reprocess: Boolean
|
||||
)
|
||||
|
||||
object ProcessMeta {
|
||||
|
@ -107,7 +107,8 @@ object ReProcessItem {
|
||||
Seq.empty,
|
||||
false,
|
||||
None,
|
||||
None
|
||||
None,
|
||||
true
|
||||
),
|
||||
Nil
|
||||
).pure[F]
|
||||
|
Loading…
x
Reference in New Issue
Block a user