1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Update standard gem

This commit is contained in:
Mike Perham 2021-05-24 12:30:03 -07:00
parent 614d41585b
commit d86fe256e8
3 changed files with 34 additions and 36 deletions

View file

@ -107,7 +107,7 @@ GEM
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
parallel (1.20.1)
parser (3.0.0.0)
parser (3.0.1.1)
ast (~> 2.4.1)
racc (1.5.2)
rack (2.2.3)
@ -143,20 +143,20 @@ GEM
rake (13.0.3)
redis (4.2.5)
regexp_parser (2.1.1)
rexml (3.2.4)
rubocop (1.11.0)
rexml (3.2.5)
rubocop (1.14.0)
parallel (~> 1.10)
parser (>= 3.0.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.2.0, < 2.0)
rubocop-ast (>= 1.5.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.4.1)
parser (>= 2.7.1.5)
rubocop-performance (1.10.1)
rubocop (>= 0.90.0, < 2.0)
rubocop-ast (1.5.0)
parser (>= 3.0.1.1)
rubocop-performance (1.11.2)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
ruby-progressbar (1.11.0)
simplecov (0.19.0)
@ -171,9 +171,9 @@ GEM
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.4.2)
standard (1.0.4)
rubocop (= 1.11.0)
rubocop-performance (= 1.10.1)
standard (1.1.1)
rubocop (= 1.14.0)
rubocop-performance (= 1.11.2)
thor (1.1.0)
toxiproxy (1.0.3)
tzinfo (2.0.4)
@ -200,3 +200,6 @@ DEPENDENCIES
sqlite3
standard
toxiproxy
BUNDLED WITH
2.2.15

View file

@ -238,26 +238,22 @@ module Sidekiq
end
def to_data
@data ||= begin
{
"hostname" => hostname,
"started_at" => Time.now.to_f,
"pid" => ::Process.pid,
"tag" => @options[:tag] || "",
"concurrency" => @options[:concurrency],
"queues" => @options[:queues].uniq,
"labels" => @options[:labels],
"identity" => identity
}
end
@data ||= {
"hostname" => hostname,
"started_at" => Time.now.to_f,
"pid" => ::Process.pid,
"tag" => @options[:tag] || "",
"concurrency" => @options[:concurrency],
"queues" => @options[:queues].uniq,
"labels" => @options[:labels],
"identity" => identity
}
end
def to_json
@json ||= begin
# this data changes infrequently so dump it to a string
# now so we don't need to dump it every heartbeat.
Sidekiq.dump_json(to_data)
end
# this data changes infrequently so dump it to a string
# now so we don't need to dump it every heartbeat.
@json ||= Sidekiq.dump_json(to_data)
end
end
end

View file

@ -10,14 +10,13 @@ module Sidekiq
module WebHelpers
def strings(lang)
@strings ||= {}
@strings[lang] ||= begin
# Allow sidekiq-web extensions to add locale paths
# so extensions can be localized
settings.locales.each_with_object({}) do |path, global|
find_locale_files(lang).each do |file|
strs = YAML.load(File.open(file))
global.merge!(strs[lang])
end
# Allow sidekiq-web extensions to add locale paths
# so extensions can be localized
@strings[lang] ||= settings.locales.each_with_object({}) do |path, global|
find_locale_files(lang).each do |file|
strs = YAML.load(File.open(file))
global.merge!(strs[lang])
end
end
end