From 93f4d5f0a28416e2f1a5211a8530b2b1c0368e3f Mon Sep 17 00:00:00 2001 From: Alberto Romeu Date: Wed, 14 Mar 2018 13:23:31 +0100 Subject: [PATCH] change queue name --- lib/resque/user_jobs.rb | 5 ++++- script/resque | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/resque/user_jobs.rb b/lib/resque/user_jobs.rb index de56b0e6b6..19bfd475f4 100644 --- a/lib/resque/user_jobs.rb +++ b/lib/resque/user_jobs.rb @@ -57,13 +57,16 @@ module Resque module RateLimitsJobs module SyncRedis extend ::Resque::Metrics - @queue = :users + @queue = :batch_updates def self.perform(account_type) rate_limit = Carto::AccountType.find(account_type).rate_limit Carto::User.where(account_type: account_type, rate_limit_id: nil).find_each do |user| rate_limit.save_to_redis(user) end + rescue => e + CartoDB::Logger.error(exception: e, message: 'Error syncing rate limits to redis', account_type: account_type) + raise e end end end diff --git a/script/resque b/script/resque index b8a0ff411d..57aa704313 100755 --- a/script/resque +++ b/script/resque @@ -1,2 +1,2 @@ #!/bin/sh -VVERBOSE=true QUEUE=imports,exports,users,user_dbs,geocodings,synchronizations,tracker,user_migrations,gears rake environment resque:work +VVERBOSE=true QUEUE=imports,exports,users,user_dbs,geocodings,synchronizations,tracker,user_migrations,batch_updates,gears rake environment resque:work