Skip to content

Commit 70e475c

Browse files
committed
rename Shard#description to id
test plan: * make sure page views are still processed Change-Id: I07ead6c075823c2021fdcc0cc1f1fddf70f695d0 Reviewed-on: https://gerrit.instructure.com/13810 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Jacob Fugal <jacob@instructure.com>
1 parent 1c95caf commit 70e475c

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

app/models/page_view.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def self.cache_queue_name
136136
def self.process_cache_queue
137137
redis = Canvas.redis
138138
lock_key = 'page_view_queue_processing'
139-
lock_key += ":#{Shard.current.description}" unless Shard.current.default?
139+
lock_key += ":#{Shard.current.id}" unless Shard.current.default?
140140
lock_time = Setting.get("page_view_queue_lock_time", 15.minutes.to_s).to_i
141141

142142
# lock other processors out until we're done. if more than lock_time

config/periodic_jobs.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
Delayed::Periodic.cron 'PageView.process_cache_queue', '*/1 * * * *' do
7575
Shard.with_each_shard do
7676
unless Shard.current.settings[:process_page_view_queue] == false
77-
PageView.send_later_enqueue_args(:process_cache_queue, :singleton => "PageView.process_cache_queue:#{Shard.current.description}")
77+
PageView.send_later_enqueue_args(:process_cache_queue, :singleton => "PageView.process_cache_queue:#{Shard.current.id}")
7878
end
7979
end
8080
end

lib/stubs/shard.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def settings
4949
{}
5050
end
5151

52-
def description
52+
def id
5353
"default"
5454
end
5555

0 commit comments

Comments
 (0)