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)
|
def execute(args)
|
||||||
if SiteSetting.version_checks
|
if SiteSetting.version_checks
|
||||||
|
begin
|
||||||
json = DiscourseHub.discourse_version_check
|
json = DiscourseHub.discourse_version_check
|
||||||
DiscourseUpdates.latest_version = json['latestVersion']
|
DiscourseUpdates.latest_version = json['latestVersion']
|
||||||
DiscourseUpdates.critical_updates_available = json['criticalUpdates']
|
DiscourseUpdates.critical_updates_available = json['criticalUpdates']
|
||||||
DiscourseUpdates.missing_versions_count = json['missingVersionsCount']
|
DiscourseUpdates.missing_versions_count = json['missingVersionsCount']
|
||||||
|
rescue => e
|
||||||
|
raise e unless Rails.env == 'development' # Fail version check silently in development mode
|
||||||
|
end
|
||||||
end
|
end
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue