Skip to content

Instantly share code, notes, and snippets.

@kirs
Created August 17, 2020 20:43
Show Gist options
  • Save kirs/ca1c96f41a37ef3a0f0188df4502cd0a to your computer and use it in GitHub Desktop.
Save kirs/ca1c96f41a37ef3a0f0188df4502cd0a to your computer and use it in GitHub Desktop.
class MassProcessThingsJob < ApplicationJob
  extend SequentialPerform
  perform_sequentially(enum_argument: 0, batch_size: 200, jitter_delay: 1..60)

  def perform(ids_of_things)
    # ...
  end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment