Fix queueing on jobs still in default queue

This commit is contained in:
Max Wofford 2025-05-26 18:37:37 -04:00
parent 3134fef95f
commit f62d57fbf0
2 changed files with 9 additions and 3 deletions

View file

@ -1,5 +1,8 @@
class SyncAllUserRepoEventsJob < ApplicationJob
queue_as :default # Or a more specific queue like :batch_enqueueing
queue_as :literally_whenever
include HasEnqueueControl
enqueue_limit
def perform
Rails.logger.info "Kicking off SyncAllUserRepoEventsJob"

View file

@ -1,8 +1,11 @@
class UpdateSlackNeighborhoodChannelsJob < ApplicationJob
queue_as :default
queue_as :literally_whenever
include HasEnqueueControl
enqueue_limit
def perform
User.where.not(slack_uid: nil).find_each(batch_size: 100) do |user|
User.where.not(slack_uid: nil).find_each(batch_size: 1000) do |user|
user.set_neighborhood_channel
user.save! if user.changed?
end