mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 20:24:05 -06:00
FIX: Continue if checking themes if updating one fails (#19665)
This commit is contained in:
parent
baccf7e5c9
commit
dfc449a32e
@ -11,9 +11,11 @@ module Jobs
|
|||||||
.where.not(remote_url: "")
|
.where.not(remote_url: "")
|
||||||
|
|
||||||
target_themes.each do |remote|
|
target_themes.each do |remote|
|
||||||
|
Discourse.capture_exceptions(message: "Error updating theme #{remote.id}") do
|
||||||
remote.update_remote_version
|
remote.update_remote_version
|
||||||
remote.save!
|
remote.save!
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
@ -932,6 +932,13 @@ module Discourse
|
|||||||
STDERR.puts "Failed to report exception #{e} #{message}"
|
STDERR.puts "Failed to report exception #{e} #{message}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.capture_exceptions(message: "", env: nil)
|
||||||
|
yield
|
||||||
|
rescue Exception => e
|
||||||
|
Discourse.warn_exception(e, message: message, env: env)
|
||||||
|
nil
|
||||||
|
end
|
||||||
|
|
||||||
def self.deprecate(warning, drop_from: nil, since: nil, raise_error: false, output_in_test: false)
|
def self.deprecate(warning, drop_from: nil, since: nil, raise_error: false, output_in_test: false)
|
||||||
location = caller_locations[1].yield_self { |l| "#{l.path}:#{l.lineno}:in \`#{l.label}\`" }
|
location = caller_locations[1].yield_self { |l| "#{l.path}:#{l.lineno}:in \`#{l.label}\`" }
|
||||||
warning = ["Deprecation notice:", warning]
|
warning = ["Deprecation notice:", warning]
|
||||||
|
Loading…
Reference in New Issue
Block a user