FIX: Continue if checking themes if updating one fails (#19665)
This commit is contained in:
parent
baccf7e5c9
commit
dfc449a32e
|
@ -11,8 +11,10 @@ module Jobs
|
|||
.where.not(remote_url: "")
|
||||
|
||||
target_themes.each do |remote|
|
||||
remote.update_remote_version
|
||||
remote.save!
|
||||
Discourse.capture_exceptions(message: "Error updating theme #{remote.id}") do
|
||||
remote.update_remote_version
|
||||
remote.save!
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -932,6 +932,13 @@ module Discourse
|
|||
STDERR.puts "Failed to report exception #{e} #{message}"
|
||||
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)
|
||||
location = caller_locations[1].yield_self { |l| "#{l.path}:#{l.lineno}:in \`#{l.label}\`" }
|
||||
warning = ["Deprecation notice:", warning]
|
||||
|
|
Loading…
Reference in New Issue