summaryrefslogtreecommitdiff
path: root/src/invidious/jobs/update_decrypt_function_job.cr
blob: 6fa0ae1bfc156e88c447592bbe1cedcba5c91712 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class Invidious::Jobs::UpdateDecryptFunctionJob < Invidious::Jobs::BaseJob
  def begin
    loop do
      begin
        DECRYPT_FUNCTION.update_decrypt_function
      rescue ex
        LOGGER.error("UpdateDecryptFunctionJob : #{ex.message}")
      ensure
        sleep 1.minute
        Fiber.yield
      end
    end
  end
end