mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-28 01:56:01 -05:00
17 lines
No EOL
412 B
Ruby
17 lines
No EOL
412 B
Ruby
require_dependency 'discourse_hub'
|
|
require_dependency 'discourse_updates'
|
|
|
|
module Jobs
|
|
class VersionCheck < Jobs::Base
|
|
|
|
def execute(args)
|
|
if SiteSetting.version_checks
|
|
json = DiscourseHub.discourse_version_check
|
|
DiscourseUpdates.latest_version = json['latestVersion']
|
|
DiscourseUpdates.critical_update_available = json['criticalUpdates']
|
|
end
|
|
true
|
|
end
|
|
|
|
end
|
|
end |