Commit 52b19c35 authored by Nick Thomas's avatar Nick Thomas

Add Gitlab::Geo::LogHelpers to Geo::Scheduler::PerShardSchedulerWorker

parent b1226f6f
...@@ -4,6 +4,7 @@ module Geo ...@@ -4,6 +4,7 @@ module Geo
include ApplicationWorker include ApplicationWorker
include CronjobQueue include CronjobQueue
include ::Gitlab::Utils::StrongMemoize include ::Gitlab::Utils::StrongMemoize
include ::Gitlab::Geo::LogHelpers
HEALTHY_SHARD_CHECKS = [ HEALTHY_SHARD_CHECKS = [
Gitlab::HealthChecks::FsShardsCheck, Gitlab::HealthChecks::FsShardsCheck,
......
...@@ -3,7 +3,10 @@ module Geo ...@@ -3,7 +3,10 @@ module Geo
module Primary module Primary
class PerShardSchedulerWorker < Geo::Scheduler::PerShardSchedulerWorker class PerShardSchedulerWorker < Geo::Scheduler::PerShardSchedulerWorker
def perform def perform
return unless Gitlab::Geo.primary? unless Gitlab::Geo.primary?
log_info('Current node not a primary')
return
end
super super
end end
......
require 'spec_helper'
describe Geo::Scheduler::PerShardSchedulerWorker do
it 'includes ::Gitlab::Geo::LogHelpers' do
expect(described_class).to include_module(::Gitlab::Geo::LogHelpers)
end
it 'needs many other specs'
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment