Chatwoot/app/jobs/internal/check_new_versions_job.rb

13 lines
310 B
Ruby
Raw Permalink Normal View History

class Internal::CheckNewVersionsJob < ApplicationJob
queue_as :scheduled_jobs
def perform
return unless Rails.env.production?
latest_version = ChatwootHub.latest_version
return unless latest_version
::Redis::Alfred.set(::Redis::Alfred::LATEST_CHATWOOT_VERSION, latest_version)
end
end