mirror of
https://github.com/System-End/hackatime.git
synced 2026-04-20 00:35:22 +00:00
Fix queueing on jobs still in default queue
This commit is contained in:
parent
3134fef95f
commit
f62d57fbf0
2 changed files with 9 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue