Add the SyncWorker and its cron configuration for Oban.

This commit is contained in:
2025-04-27 14:07:57 +03:00
parent f4c2207a80
commit dff915e835
2 changed files with 23 additions and 1 deletions
@@ -0,0 +1,13 @@
defmodule DecentralisedBookIndex.SyncWorker do
use Oban.Worker,
queue: :default,
max_attempts: 2,
tags: ["sync", "cron"]
require Logger
@impl Oban.Worker
def perform(%Oban.Job{args: args} = job) do
SyncServerTask.sync_all()
end
end