ML-191: avoid VACUUM / scrobble refresh write collision
Set busy_timeout: 5_000 on MusicLibrary.Repo so SQLite waits up to 5 seconds on lock contention instead of throwing SQLITE_BUSY immediately (default is 0). Move RepoVacuum from 0 3 to 3 3 (3:03 AM London) to avoid the deterministic collision with RefreshScrobbles which fires on the every-5-min cadence at the hour mark.
This commit is contained in:
+3
-2
@@ -49,8 +49,9 @@ config :music_library, Oban,
|
||||
{"0 */12 * * *", MusicLibrary.Worker.PruneAssetCache},
|
||||
# every day at 2 am,
|
||||
{"0 2 * * *", MusicLibrary.Worker.PruneAssets},
|
||||
# every day at 3 am,
|
||||
{"0 3 * * *", MusicLibrary.Worker.RepoVacuum},
|
||||
# every day at 3:03 am (staggered 3 min past the hour to avoid
|
||||
# collision with RefreshScrobbles every-5-min cadence, fixes #4075)
|
||||
{"3 3 * * *", MusicLibrary.Worker.RepoVacuum},
|
||||
# every day at 4 am,
|
||||
{"0 4 * * *", MusicLibrary.Worker.RepoOptimize},
|
||||
# every first day of the month, staggered hourly
|
||||
|
||||
Reference in New Issue
Block a user