openpolitics/groupthink

View on GitHub
app/jobs/vote_counter_job.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

#
# Count votes on a proposal.
# Triggered when a webhook is received for a new comment on GitHub.
#
class VoteCounterJob < ApplicationJob
  queue_as :default

  def perform(proposal)
    proposal.count_votes!
  end
end