diff --git a/apps/indexer/lib/indexer/temporary/failed_created_addresses.ex b/apps/indexer/lib/indexer/temporary/failed_created_addresses.ex index 1a5dd99d07..af5c72028b 100644 --- a/apps/indexer/lib/indexer/temporary/failed_created_addresses.ex +++ b/apps/indexer/lib/indexer/temporary/failed_created_addresses.ex @@ -21,11 +21,22 @@ defmodule Indexer.Temporary.FailedCreatedAddresses do @impl GenServer def init(json_rpc_named_arguments) do - run(json_rpc_named_arguments) + schedule_work() {:ok, json_rpc_named_arguments} end + def schedule_work do + Process.send_after(self(), :run, 1_000) + end + + @impl GenServer + def handle_info(:run, json_rpc_named_arguments) do + run(json_rpc_named_arguments) + + {:noreply, json_rpc_named_arguments} + end + def run(json_rpc_named_arguments) do Logger.debug( [