diff --git a/lib/tasks/setup_cloud_scheduler.rake b/lib/tasks/setup_cloud_scheduler.rake new file mode 100644 index 00000000..64ede95a --- /dev/null +++ b/lib/tasks/setup_cloud_scheduler.rake @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +ENV['GOOGLE_AUTH_SUPPRESS_CREDENTIALS_WARNINGS'] ||= 'true' + +namespace :cloudtasker do + DEFAULT_FILE = 'config/cloudtasker_cron.yml' + + desc "Setup CloudScheduler. (default options: file=#{DEFAULT_FILE})" + task setup_cloud_scheduler: :environment do + Cloudtasker::CloudScheduler::Manager.synchronize!(DEFAULT_FILE) + end +end