Skip to content

Commit

Permalink
det priority
Browse files Browse the repository at this point in the history
  • Loading branch information
malano committed Oct 15, 2024
1 parent 1f6e218 commit 2951178
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/tasks/scheduled/mails.rake
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ namespace :scheduled do
task_starts_at = Time.now

#User.confirmed.find_each do |user|
# NotificationMailer.summary_graetzl(user, user.region_id, 'daily').deliver_later(queue: 'summary-mails', priority: 1)
# NotificationMailer.summary_personal(user, user.region_id, 'daily').deliver_later(queue: 'summary-mails', priority: 1)
# NotificationMailer.summary_graetzl(user, user.region_id, 'daily').deliver_later(queue: 'summary-mails')
# NotificationMailer.summary_personal(user, user.region_id, 'daily').deliver_later(queue: 'summary-mails')
#end

User.confirmed.find_in_batches(batch_size: 100) do |users_batch|
users_batch.each do |user|
NotificationMailer.summary_graetzl(user, user.region_id, 'daily').deliver_later(queue: 'summary-mails', priority: 1)
NotificationMailer.summary_personal(user, user.region_id, 'daily').deliver_later(queue: 'summary-mails', priority: 1)
NotificationMailer.summary_graetzl(user, user.region_id, 'daily').deliver_later(queue: 'summary-mails')
NotificationMailer.summary_personal(user, user.region_id, 'daily').deliver_later(queue: 'summary-mails')
end
end

Expand All @@ -56,7 +56,7 @@ namespace :scheduled do

User.confirmed.find_in_batches(batch_size: 100) do |users_batch|
users_batch.each do |user|
NotificationMailer.summary_personal(user, user.region_id, 'daily').deliver_later(queue: 'summary-mails', priority: 1)
NotificationMailer.summary_personal(user, user.region_id, 'daily').deliver_later(queue: 'summary-mails')
end
end

Expand All @@ -74,14 +74,14 @@ namespace :scheduled do
task_starts_at = Time.now

#User.confirmed.find_each do |user|
# NotificationMailer.summary_graetzl(user, user.region_id, 'weekly').deliver_later(queue: 'summary-mails', priority: 1)
# NotificationMailer.summary_personal(user, user.region_id, 'weekly').deliver_later(queue: 'summary-mails', priority: 1)
# NotificationMailer.summary_graetzl(user, user.region_id, 'weekly').deliver_later(queue: 'summary-mails')
# NotificationMailer.summary_personal(user, user.region_id, 'weekly').deliver_later(queue: 'summary-mails')
#end

User.confirmed.find_in_batches(batch_size: 100) do |users_batch|
users_batch.each do |user|
NotificationMailer.summary_graetzl(user, user.region_id, 'weekly').deliver_later(queue: 'summary-mails', priority: 1)
NotificationMailer.summary_personal(user, user.region_id, 'weekly').deliver_later(queue: 'summary-mails', priority: 1)
NotificationMailer.summary_graetzl(user, user.region_id, 'weekly').deliver_later(queue: 'summary-mails')
NotificationMailer.summary_personal(user, user.region_id, 'weekly').deliver_later(queue: 'summary-mails')
end
end

Expand Down

0 comments on commit 2951178

Please sign in to comment.