Fail version_check job silently in development mode
This commit is contained in:
parent
4fb3b58592
commit
95a939d6af
|
@ -6,10 +6,14 @@ module Jobs
|
|||
|
||||
def execute(args)
|
||||
if SiteSetting.version_checks
|
||||
begin
|
||||
json = DiscourseHub.discourse_version_check
|
||||
DiscourseUpdates.latest_version = json['latestVersion']
|
||||
DiscourseUpdates.critical_updates_available = json['criticalUpdates']
|
||||
DiscourseUpdates.missing_versions_count = json['missingVersionsCount']
|
||||
rescue => e
|
||||
raise e unless Rails.env == 'development' # Fail version check silently in development mode
|
||||
end
|
||||
end
|
||||
true
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue