Sha256: d10d0db73fc7576192d02921f1bc05a8a7978bdf393bdc1f314c65eaddb01c8f

Contents?: true

Size: 310 Bytes

Versions: 22

Compression:

Stored size: 310 Bytes

Contents

class RefreshStatusesJob < BackgroundJob
  queue_as :default

  def perform(params)
    if params[:commit_id]
      Commit.find(params[:commit_id]).refresh_statuses!
    else
      stack = Stack.find(params[:stack_id])
      stack.commits.order(id: :desc).limit(30).each(&:refresh_statuses!)
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
shipit-engine-0.1.0 app/jobs/refresh_statuses_job.rb
shipit-engine-0.0.1.pre app/jobs/refresh_statuses_job.rb