Fail version_check job silently in development mode

This commit is contained in:
Neil Lalonde 2013-03-25 11:35:33 -04:00
parent 4fb3b58592
commit 95a939d6af
1 changed files with 8 additions and 4 deletions

View File

@ -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