Closed philipjholm closed 1 year ago
Cool idea! Right now scanning happens via websocket, so there are a couple options we can evaluate:
cron
)How do you see it working from your POV?
@GAntoine I would definitely vote on the last option to have it configurable in the settings. To be honest, I was kind of looking for it there the first time I went there.
With the addition of Redis/RQ in #321, one option for this is to use rq-scheduler, which supports cron-style syntax for running recurring jobs.
However since we're watching a file system, we could go even simpler and use watchdog, running targeted scans when new files are detected.
However since we're watching a file system, we could go even simpler and use watchdog, running targeted scans when new files are detected.
Ideally both options would be available - Scan on a schedule or scan on detected changes.
@AndrewBudziszek Scan-on-schedule is totally possible, but I struggle to see a use case where "scan on file system change detected" won't offer a better experience. Network bing mounts maybe?
The better experience is absolutely "scan on file system change detected."
I'm thinking of people that are running this on servers with multiple services. Maybe they'd want to schedule scans? The amount of users that would use it is probably low so it's probably not worth implementing.
Just a thought!
When running my Plex server with network shares that store data, I noticed that it wouldn't detect file changes. In a case like that, scheduled scans were a godsend. Also, when setting up the server for the first time.
@Casuallynoted You'll be happy to hear we'll soon be supporting both! https://github.com/zurdi15/romm/pull/357
Add the possibility in settings to have automatic scheduling of game scans. Like for example to run each hour or something like that.