From ab3d65a8990dc01e54d55b8f59d2b261aeb8c5bf Mon Sep 17 00:00:00 2001 From: KKlochko Date: Sun, 25 May 2025 21:26:22 +0300 Subject: [PATCH] Update Oban configuration to prune jobs which older than 7 days. --- config/config.exs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/config.exs b/config/config.exs index 33ad87d..d13479a 100644 --- a/config/config.exs +++ b/config/config.exs @@ -12,7 +12,8 @@ config :decentralised_book_index, Oban, repo: DecentralisedBookIndex.Repo, queues: [default: 14], plugins: [ - Oban.Plugins.Pruner, + # A job will be pruned after 7 days. + {Oban.Plugins.Pruner, max_age: 7*24*60*60}, {Oban.Plugins.Cron, crontab: [ {"@daily", DecentralisedBookIndex.SyncWorker},