Sha256: 9d29a7efead5c446a403bf0d981a6cd3b3a865b77a9345d32ff85fbca5428a21

Contents?: true

Size: 629 Bytes

Versions: 4

Compression:

Stored size: 629 Bytes

Contents

# frozen_string_literal: true

require 'cloudtasker/config'
require 'cloudtasker/cloud_task'

ENV['GOOGLE_AUTH_SUPPRESS_CREDENTIALS_WARNINGS'] ||= 'true'

namespace :cloudtasker do
  desc 'Setup a Cloud Task queue. (default options: ' \
    "name=#{Cloudtasker::Config::DEFAULT_JOB_QUEUE}, " \
    "concurrency=#{Cloudtasker::Config::DEFAULT_QUEUE_CONCURRENCY}, " \
    "retries=#{Cloudtasker::Config::DEFAULT_QUEUE_RETRIES})"
  task setup_queue: :environment do
    puts Cloudtasker::CloudTask.setup_production_queue(
      name: ENV['name'],
      concurrency: ENV['concurrency'],
      retries: ENV['retries']
    )
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cloudtasker-0.13.2 lib/tasks/setup_queue.rake
cloudtasker-0.13.1 lib/tasks/setup_queue.rake
cloudtasker-0.13.0 lib/tasks/setup_queue.rake
cloudtasker-0.13.rc2 lib/tasks/setup_queue.rake