rommapp / romm

A beautiful, powerful, self-hosted rom manager
https://romm.app
GNU Affero General Public License v3.0
2.28k stars 93 forks source link

[Feature] Scheduled scans #274

Closed philipjholm closed 1 year ago

philipjholm commented 1 year ago

Add the possibility in settings to have automatic scheduling of game scans. Like for example to run each hour or something like that.

gantoine commented 1 year ago

Cool idea! Right now scanning happens via websocket, so there are a couple options we can evaluate:

How do you see it working from your POV?

philipjholm commented 1 year ago

@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.

gantoine commented 1 year ago

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.

AndrewBudziszek commented 1 year ago

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.

gantoine commented 1 year ago

@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?

AndrewBudziszek commented 1 year ago

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!

Casuallynoted commented 1 year ago

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.

gantoine commented 1 year ago

@Casuallynoted You'll be happy to hear we'll soon be supporting both! https://github.com/zurdi15/romm/pull/357

zurdi15 commented 1 year ago

This was added in the release 2.1.0