mirror of
https://github.com/SrIzan10/hc-harbor.git
synced 2026-05-01 10:45:21 +00:00
Fix queueing on jobs still in default queue
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user