From 0afe26a0045b042092bce562858b4ce969e2ae4b Mon Sep 17 00:00:00 2001 From: CJ Bryan and Matt Olenick Date: Wed, 7 Feb 2018 16:43:40 -0800 Subject: [PATCH] Get pending blocks with a scheduled job. --- config/dev.exs | 1 + config/prod.exs | 1 + 2 files changed, 2 insertions(+) diff --git a/config/dev.exs b/config/dev.exs index 591a96f1ff..c9eebd61a8 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -59,6 +59,7 @@ config :explorer, Explorer.Repo, config :explorer, Explorer.Scheduler, jobs: [ [schedule: {:extended, "*/5 * * * * *"}, task: {Explorer.Workers.ImportBlock, :perform_later, ["latest"]}], + [schedule: {:extended, "*/5 * * * * *"}, task: {Explorer.Workers.ImportBlock, :perform_later, ["pending"]}], [schedule: {:extended, "*/15 * * * * *"}, task: {Explorer.Workers.ImportSkippedBlocks, :perform_later, [1]}], ] diff --git a/config/prod.exs b/config/prod.exs index 51fa32980f..233b9c0d06 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -49,6 +49,7 @@ config :ethereumex, config :explorer, Explorer.Scheduler, jobs: [ [schedule: {:extended, "* * * * * *"}, task: {Explorer.Workers.ImportBlock, :perform_later, ["latest"]}], + [schedule: {:extended, "* * * * * *"}, task: {Explorer.Workers.ImportBlock, :perform_later, ["pending"]}], [schedule: {:extended, "*/15 * * * * *"}, task: {Explorer.Workers.ImportSkippedBlocks, :perform_later, [String.to_integer(System.get_env("EXPLORER_BACKFILL_CONCURRENCY") || "1")]}], ]