Class: Fopost::Rails::ApplicationJob

Inherits:
ActiveJob::Base
  • Object
show all
Defined in:
lib/fopost/rails/application_job.rb

Overview

Base for the jobs this gem ships.

A rate-limited call is re-enqueued for exactly as long as the API asked for in Retry-After, instead of a guessed backoff.

Direct Known Subclasses

CreatePostJob, PublishJob

Constant Summary collapse

MAX_RETRY_WAIT =

The API never asks for longer than a minute; ignore it if it does.

60
RETRY_AFTER_KEY =

ActiveJob hands the wait: proc the attempt count and nothing else, so the seconds the API asked for ride along on the thread that raised. rescue_from runs on that same thread, right after perform.

:fopost_rails_retry_after