assemblymade/coderwall

View on GitHub
app/jobs/deactivate_team_jobs_job.rb

Summary

Maintainability
A
0 mins
Test Coverage
class DeactivateTeamJobsJob
  include Sidekiq::Worker

  sidekiq_options queue: :team

  def perform(id)
    team = Team.find(id)
    team.jobs.each do |job|
      job.deactivate!
    end
  end
end