diff --git a/lib/decentralised_book_index/sync/sync_workers/sync_worker.ex b/lib/decentralised_book_index/sync/sync_workers/sync_worker.ex index ffa130a..2a3063d 100644 --- a/lib/decentralised_book_index/sync/sync_workers/sync_worker.ex +++ b/lib/decentralised_book_index/sync/sync_workers/sync_worker.ex @@ -6,8 +6,16 @@ defmodule DecentralisedBookIndex.SyncWorker do require Logger + alias DecentralisedBookIndex.SyncTasks.SyncServerTask + @impl Oban.Worker def perform(%Oban.Job{args: args} = job) do - SyncServerTask.sync_all() + Logger.info("The cron job (#{job.id}) run SyncServerTask at #{DateTime.utc_now()} with args: #{inspect(args)}") + + result = SyncServerTask.sync_all() + + Logger.info("The cron job (#{job.id}) is done.") + + result end end