Get pending blocks with a scheduled job.

pull/2/head
CJ Bryan and Matt Olenick 7 years ago
parent 12e67122bc
commit 0afe26a004
  1. 1
      config/dev.exs
  2. 1
      config/prod.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]}],
]

@ -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")]}],
]

Loading…
Cancel
Save