Cloudbox / autoscan

Autoscan replaces the default Plex and Emby behaviour for picking up changes on the file system.
MIT License
611 stars 53 forks source link

Logs saying it's trying to scan every 15 seconds #81

Closed Glasti1 closed 3 years ago

Glasti1 commented 3 years ago

No scans are available, retrying in 15 seconds...

Is this normal? How can I make this longer?

Setting scan-delay: 90s doesn't change it

m-rots commented 3 years ago

Trace mode highlights the internal behaviour of Autoscan. I advise you to use debug mode instead (if necessary) or run with the standard logging behaviour.

To answer your question: Triggers emit scans which get passed to the processor. The processor then saves this scan to its internal sqlite database (autoscan.db). This happens for both persistence and grouping behaviour. Once a scan is older than the min-age, then this scan is technically ready to get processed by the processor. However, as sqlite is not event-driven, Autoscan has to poll its database frequently (every 15 seconds if it did not contain scans in the previous iteration) to check whether any of the scans are older than min-age, to then pickup the scan and send it off to the targets.

Scan delay targets a different scenario. 15 seconds of delay is introduced when there was no “ready” scan in the previous iteration. While the scan-delay value is introduced when there was a “ready” scan in the previous iteration.

In other words, yes this is normal. And no this is not customisable and cannot be made longer. It’s internal behaviour regarding the delay time when no scans are available.