mirror of
https://github.com/gotson/komga.git
synced 2025-12-22 00:13:30 +01:00
feat(scan): add configuration to disable startup scan
scan at startup is disabled by default
This commit is contained in:
parent
60ce87a25d
commit
37590dd912
3 changed files with 5 additions and 7 deletions
|
|
@ -13,6 +13,8 @@ import javax.validation.constraints.Positive
|
|||
class KomgaProperties {
|
||||
var librariesScanCron: String = ""
|
||||
|
||||
var librariesScanStartup: Boolean = false
|
||||
|
||||
var librariesScanDirectoryExclusions: List<String> = emptyList()
|
||||
|
||||
var filesystemScannerForceDirectoryModifiedTime: Boolean = false
|
||||
|
|
@ -21,10 +23,7 @@ class KomgaProperties {
|
|||
|
||||
class Threads {
|
||||
@Min(1)
|
||||
@Deprecated("Deprecated since 0.10", ReplaceWith("analyzer"))
|
||||
var parse: Int = 2
|
||||
|
||||
@Min(1)
|
||||
@Deprecated("Deprecated since 0.28")
|
||||
var analyzer: Int = 2
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class PeriodicScannerController(
|
|||
private val taskReceiver: TaskReceiver
|
||||
) {
|
||||
|
||||
@EventListener(ApplicationReadyEvent::class)
|
||||
@EventListener(classes = [ApplicationReadyEvent::class], condition = "@komgaProperties.librariesScanStartup")
|
||||
@Scheduled(cron = "#{@komgaProperties.librariesScanCron ?: '-'}")
|
||||
fun scanAllLibraries() {
|
||||
taskReceiver.scanLibraries()
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
komga:
|
||||
threads:
|
||||
analyzer: 1
|
||||
filesystem-scanner-force-directory-modified-time: false
|
||||
remember-me:
|
||||
key: changeMe!
|
||||
validity: 2592000 # 1 month
|
||||
# libraries-scan-cron: "*/5 * * * * ?" #every 5 seconds
|
||||
libraries-scan-cron: "-" #disable
|
||||
libraries-scan-startup: true
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:h2:mem:testdb
|
||||
|
|
|
|||
Loading…
Reference in a new issue