mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
[Active Job] rubocop -a --only Layout/EmptyLineAfterMagicComment
This commit is contained in:
parent
ac717d65a3
commit
aa28c5ca65
100 changed files with 100 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rake/testtask"
|
require "rake/testtask"
|
||||||
|
|
||||||
#TODO: add qu back to the list after it support Rails 5.1
|
#TODO: add qu back to the list after it support Rails 5.1
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
version = File.read(File.expand_path("../RAILS_VERSION", __dir__)).strip
|
version = File.read(File.expand_path("../RAILS_VERSION", __dir__)).strip
|
||||||
|
|
||||||
Gem::Specification.new do |s|
|
Gem::Specification.new do |s|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
#--
|
#--
|
||||||
# Copyright (c) 2014-2017 David Heinemeier Hansson
|
# Copyright (c) 2014-2017 David Heinemeier Hansson
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "active_support/core_ext/hash"
|
require "active_support/core_ext/hash"
|
||||||
|
|
||||||
module ActiveJob
|
module ActiveJob
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require_relative "core"
|
require_relative "core"
|
||||||
require_relative "queue_adapter"
|
require_relative "queue_adapter"
|
||||||
require_relative "queue_name"
|
require_relative "queue_name"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "active_support/callbacks"
|
require "active_support/callbacks"
|
||||||
|
|
||||||
module ActiveJob
|
module ActiveJob
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module ActiveJob
|
module ActiveJob
|
||||||
class ConfiguredJob #:nodoc:
|
class ConfiguredJob #:nodoc:
|
||||||
def initialize(job_class, options = {})
|
def initialize(job_class, options = {})
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module ActiveJob
|
module ActiveJob
|
||||||
# Provides general behavior that will be included into every Active Job
|
# Provides general behavior that will be included into every Active Job
|
||||||
# object that inherits from ActiveJob::Base.
|
# object that inherits from ActiveJob::Base.
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require_relative "arguments"
|
require_relative "arguments"
|
||||||
|
|
||||||
module ActiveJob
|
module ActiveJob
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "active_support/core_ext/numeric/time"
|
require "active_support/core_ext/numeric/time"
|
||||||
|
|
||||||
module ActiveJob
|
module ActiveJob
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "active_support/rescuable"
|
require "active_support/rescuable"
|
||||||
require_relative "arguments"
|
require_relative "arguments"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module ActiveJob
|
module ActiveJob
|
||||||
# Returns the version of the currently loaded Active Job as a <tt>Gem::Version</tt>
|
# Returns the version of the currently loaded Active Job as a <tt>Gem::Version</tt>
|
||||||
def self.gem_version
|
def self.gem_version
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "active_support/core_ext/hash/transform_values"
|
require "active_support/core_ext/hash/transform_values"
|
||||||
require "active_support/core_ext/string/filters"
|
require "active_support/core_ext/string/filters"
|
||||||
require "active_support/tagged_logging"
|
require "active_support/tagged_logging"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "active_support/core_ext/string/inflections"
|
require "active_support/core_ext/string/inflections"
|
||||||
|
|
||||||
module ActiveJob
|
module ActiveJob
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module ActiveJob
|
module ActiveJob
|
||||||
# == Active Job adapters
|
# == Active Job adapters
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "securerandom"
|
require "securerandom"
|
||||||
require "concurrent/scheduled_task"
|
require "concurrent/scheduled_task"
|
||||||
require "concurrent/executor/thread_pool_executor"
|
require "concurrent/executor/thread_pool_executor"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "backburner"
|
require "backburner"
|
||||||
|
|
||||||
module ActiveJob
|
module ActiveJob
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "delayed_job"
|
require "delayed_job"
|
||||||
|
|
||||||
module ActiveJob
|
module ActiveJob
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module ActiveJob
|
module ActiveJob
|
||||||
module QueueAdapters
|
module QueueAdapters
|
||||||
# == Active Job Inline adapter
|
# == Active Job Inline adapter
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "qu"
|
require "qu"
|
||||||
|
|
||||||
module ActiveJob
|
module ActiveJob
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "que"
|
require "que"
|
||||||
|
|
||||||
module ActiveJob
|
module ActiveJob
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "queue_classic"
|
require "queue_classic"
|
||||||
|
|
||||||
module ActiveJob
|
module ActiveJob
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "resque"
|
require "resque"
|
||||||
require "active_support/core_ext/enumerable"
|
require "active_support/core_ext/enumerable"
|
||||||
require "active_support/core_ext/array/access"
|
require "active_support/core_ext/array/access"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "sidekiq"
|
require "sidekiq"
|
||||||
|
|
||||||
module ActiveJob
|
module ActiveJob
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "sneakers"
|
require "sneakers"
|
||||||
require "monitor"
|
require "monitor"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "sucker_punch"
|
require "sucker_punch"
|
||||||
|
|
||||||
module ActiveJob
|
module ActiveJob
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module ActiveJob
|
module ActiveJob
|
||||||
module QueueAdapters
|
module QueueAdapters
|
||||||
# == Test adapter for Active Job
|
# == Test adapter for Active Job
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module ActiveJob
|
module ActiveJob
|
||||||
module QueueName
|
module QueueName
|
||||||
extend ActiveSupport::Concern
|
extend ActiveSupport::Concern
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module ActiveJob
|
module ActiveJob
|
||||||
module QueuePriority
|
module QueuePriority
|
||||||
extend ActiveSupport::Concern
|
extend ActiveSupport::Concern
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "global_id/railtie"
|
require "global_id/railtie"
|
||||||
require "active_job"
|
require "active_job"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "active_support/test_case"
|
require "active_support/test_case"
|
||||||
|
|
||||||
module ActiveJob
|
module ActiveJob
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "active_support/core_ext/class/subclasses"
|
require "active_support/core_ext/class/subclasses"
|
||||||
require "active_support/core_ext/hash/keys"
|
require "active_support/core_ext/hash/keys"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module ActiveJob
|
module ActiveJob
|
||||||
module Translation #:nodoc:
|
module Translation #:nodoc:
|
||||||
extend ActiveSupport::Concern
|
extend ActiveSupport::Concern
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require_relative "gem_version"
|
require_relative "gem_version"
|
||||||
|
|
||||||
module ActiveJob
|
module ActiveJob
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "rails/generators/named_base"
|
require "rails/generators/named_base"
|
||||||
|
|
||||||
module Rails # :nodoc:
|
module Rails # :nodoc:
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
ActiveJob::Base.queue_adapter = :async
|
ActiveJob::Base.queue_adapter = :async
|
||||||
ActiveJob::Base.queue_adapter.immediate = true
|
ActiveJob::Base.queue_adapter.immediate = true
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "support/backburner/inline"
|
require "support/backburner/inline"
|
||||||
|
|
||||||
ActiveJob::Base.queue_adapter = :backburner
|
ActiveJob::Base.queue_adapter = :backburner
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
ActiveJob::Base.queue_adapter = :delayed_job
|
ActiveJob::Base.queue_adapter = :delayed_job
|
||||||
|
|
||||||
$LOAD_PATH << File.expand_path("../support/delayed_job", __dir__)
|
$LOAD_PATH << File.expand_path("../support/delayed_job", __dir__)
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
ActiveJob::Base.queue_adapter = :inline
|
ActiveJob::Base.queue_adapter = :inline
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "qu-immediate"
|
require "qu-immediate"
|
||||||
|
|
||||||
ActiveJob::Base.queue_adapter = :qu
|
ActiveJob::Base.queue_adapter = :qu
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "support/que/inline"
|
require "support/que/inline"
|
||||||
|
|
||||||
ActiveJob::Base.queue_adapter = :que
|
ActiveJob::Base.queue_adapter = :que
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "support/queue_classic/inline"
|
require "support/queue_classic/inline"
|
||||||
ActiveJob::Base.queue_adapter = :queue_classic
|
ActiveJob::Base.queue_adapter = :queue_classic
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
ActiveJob::Base.queue_adapter = :resque
|
ActiveJob::Base.queue_adapter = :resque
|
||||||
Resque.inline = true
|
Resque.inline = true
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "sidekiq/testing/inline"
|
require "sidekiq/testing/inline"
|
||||||
ActiveJob::Base.queue_adapter = :sidekiq
|
ActiveJob::Base.queue_adapter = :sidekiq
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "support/sneakers/inline"
|
require "support/sneakers/inline"
|
||||||
ActiveJob::Base.queue_adapter = :sneakers
|
ActiveJob::Base.queue_adapter = :sneakers
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "sucker_punch/testing/inline"
|
require "sucker_punch/testing/inline"
|
||||||
ActiveJob::Base.queue_adapter = :sucker_punch
|
ActiveJob::Base.queue_adapter = :sucker_punch
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
ActiveJob::Base.queue_adapter = :test
|
ActiveJob::Base.queue_adapter = :test
|
||||||
ActiveJob::Base.queue_adapter.perform_enqueued_jobs = true
|
ActiveJob::Base.queue_adapter.perform_enqueued_jobs = true
|
||||||
ActiveJob::Base.queue_adapter.perform_enqueued_at_jobs = true
|
ActiveJob::Base.queue_adapter.perform_enqueued_at_jobs = true
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "helper"
|
require "helper"
|
||||||
|
|
||||||
class AdapterTest < ActiveSupport::TestCase
|
class AdapterTest < ActiveSupport::TestCase
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "helper"
|
require "helper"
|
||||||
require "active_job/arguments"
|
require "active_job/arguments"
|
||||||
require "models/person"
|
require "models/person"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "helper"
|
require "helper"
|
||||||
require "jobs/callback_job"
|
require "jobs/callback_job"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "helper"
|
require "helper"
|
||||||
require "jobs/retry_job"
|
require "jobs/retry_job"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "helper"
|
require "helper"
|
||||||
require "jobs/gid_job"
|
require "jobs/gid_job"
|
||||||
require "jobs/hello_job"
|
require "jobs/hello_job"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "helper"
|
require "helper"
|
||||||
require "active_support/log_subscriber/test_helper"
|
require "active_support/log_subscriber/test_helper"
|
||||||
require "active_support/core_ext/numeric/time"
|
require "active_support/core_ext/numeric/time"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "helper"
|
require "helper"
|
||||||
|
|
||||||
module ActiveJob
|
module ActiveJob
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "helper"
|
require "helper"
|
||||||
require "jobs/hello_job"
|
require "jobs/hello_job"
|
||||||
require "jobs/logging_job"
|
require "jobs/logging_job"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "helper"
|
require "helper"
|
||||||
require "jobs/hello_job"
|
require "jobs/hello_job"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "helper"
|
require "helper"
|
||||||
require "jobs/hello_job"
|
require "jobs/hello_job"
|
||||||
require "active_support/core_ext/numeric/time"
|
require "active_support/core_ext/numeric/time"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "helper"
|
require "helper"
|
||||||
require "jobs/rescue_job"
|
require "jobs/rescue_job"
|
||||||
require "models/person"
|
require "models/person"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "helper"
|
require "helper"
|
||||||
require "jobs/hello_job"
|
require "jobs/hello_job"
|
||||||
require "jobs/logging_job"
|
require "jobs/logging_job"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "helper"
|
require "helper"
|
||||||
require "active_support/core_ext/time"
|
require "active_support/core_ext/time"
|
||||||
require "active_support/core_ext/date"
|
require "active_support/core_ext/date"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "helper"
|
require "helper"
|
||||||
require "jobs/translated_hello_job"
|
require "jobs/translated_hello_job"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "active_job"
|
require "active_job"
|
||||||
require "support/job_buffer"
|
require "support/job_buffer"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "helper"
|
require "helper"
|
||||||
require "jobs/logging_job"
|
require "jobs/logging_job"
|
||||||
require "jobs/hello_job"
|
require "jobs/hello_job"
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class ApplicationJob < ActiveJob::Base
|
class ApplicationJob < ActiveJob::Base
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class CallbackJob < ActiveJob::Base
|
class CallbackJob < ActiveJob::Base
|
||||||
before_perform ->(job) { job.history << "CallbackJob ran before_perform" }
|
before_perform ->(job) { job.history << "CallbackJob ran before_perform" }
|
||||||
after_perform ->(job) { job.history << "CallbackJob ran after_perform" }
|
after_perform ->(job) { job.history << "CallbackJob ran after_perform" }
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require_relative "../support/job_buffer"
|
require_relative "../support/job_buffer"
|
||||||
|
|
||||||
class GidJob < ActiveJob::Base
|
class GidJob < ActiveJob::Base
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require_relative "../support/job_buffer"
|
require_relative "../support/job_buffer"
|
||||||
|
|
||||||
class HelloJob < ActiveJob::Base
|
class HelloJob < ActiveJob::Base
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require_relative "application_job"
|
require_relative "application_job"
|
||||||
|
|
||||||
class InheritedJob < ApplicationJob
|
class InheritedJob < ApplicationJob
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require_relative "../support/job_buffer"
|
require_relative "../support/job_buffer"
|
||||||
|
|
||||||
class KwargsJob < ActiveJob::Base
|
class KwargsJob < ActiveJob::Base
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class LoggingJob < ActiveJob::Base
|
class LoggingJob < ActiveJob::Base
|
||||||
def perform(dummy)
|
def perform(dummy)
|
||||||
logger.info "Dummy, here is it: #{dummy}"
|
logger.info "Dummy, here is it: #{dummy}"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class NestedJob < ActiveJob::Base
|
class NestedJob < ActiveJob::Base
|
||||||
def perform
|
def perform
|
||||||
LoggingJob.perform_later "NestedJob"
|
LoggingJob.perform_later "NestedJob"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class OverriddenLoggingJob < ActiveJob::Base
|
class OverriddenLoggingJob < ActiveJob::Base
|
||||||
def perform(dummy)
|
def perform(dummy)
|
||||||
logger.info "Dummy, here is it: #{dummy}"
|
logger.info "Dummy, here is it: #{dummy}"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require_relative "../support/job_buffer"
|
require_relative "../support/job_buffer"
|
||||||
|
|
||||||
class ProviderJidJob < ActiveJob::Base
|
class ProviderJidJob < ActiveJob::Base
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class QueueAdapterJob < ActiveJob::Base
|
class QueueAdapterJob < ActiveJob::Base
|
||||||
self.queue_adapter = :inline
|
self.queue_adapter = :inline
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require_relative "../support/job_buffer"
|
require_relative "../support/job_buffer"
|
||||||
|
|
||||||
class QueueAsJob < ActiveJob::Base
|
class QueueAsJob < ActiveJob::Base
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require_relative "../support/job_buffer"
|
require_relative "../support/job_buffer"
|
||||||
|
|
||||||
class RescueJob < ActiveJob::Base
|
class RescueJob < ActiveJob::Base
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require_relative "../support/job_buffer"
|
require_relative "../support/job_buffer"
|
||||||
require "active_support/core_ext/integer/inflections"
|
require "active_support/core_ext/integer/inflections"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require_relative "../support/job_buffer"
|
require_relative "../support/job_buffer"
|
||||||
|
|
||||||
class TranslatedHelloJob < ActiveJob::Base
|
class TranslatedHelloJob < ActiveJob::Base
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class Person
|
class Person
|
||||||
class RecordNotFound < StandardError; end
|
class RecordNotFound < StandardError; end
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "backburner"
|
require "backburner"
|
||||||
|
|
||||||
Backburner::Worker.class_eval do
|
Backburner::Worker.class_eval do
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
#copied from https://github.com/collectiveidea/delayed_job/blob/master/spec/delayed/backend/test.rb
|
#copied from https://github.com/collectiveidea/delayed_job/blob/master/spec/delayed/backend/test.rb
|
||||||
require "ostruct"
|
require "ostruct"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module AsyncJobsManager
|
module AsyncJobsManager
|
||||||
def setup
|
def setup
|
||||||
ActiveJob::Base.queue_adapter = :async
|
ActiveJob::Base.queue_adapter = :async
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module BackburnerJobsManager
|
module BackburnerJobsManager
|
||||||
def setup
|
def setup
|
||||||
ActiveJob::Base.queue_adapter = :backburner
|
ActiveJob::Base.queue_adapter = :backburner
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "delayed_job"
|
require "delayed_job"
|
||||||
require "delayed_job_active_record"
|
require "delayed_job_active_record"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module InlineJobsManager
|
module InlineJobsManager
|
||||||
def setup
|
def setup
|
||||||
ActiveJob::Base.queue_adapter = :inline
|
ActiveJob::Base.queue_adapter = :inline
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module QuJobsManager
|
module QuJobsManager
|
||||||
def setup
|
def setup
|
||||||
require "qu-rails"
|
require "qu-rails"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module QueJobsManager
|
module QueJobsManager
|
||||||
def setup
|
def setup
|
||||||
require "sequel"
|
require "sequel"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module QueueClassicJobsManager
|
module QueueClassicJobsManager
|
||||||
def setup
|
def setup
|
||||||
ENV["QC_DATABASE_URL"] ||= "postgres:///active_jobs_qc_int_test"
|
ENV["QC_DATABASE_URL"] ||= "postgres:///active_jobs_qc_int_test"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module ResqueJobsManager
|
module ResqueJobsManager
|
||||||
def setup
|
def setup
|
||||||
ActiveJob::Base.queue_adapter = :resque
|
ActiveJob::Base.queue_adapter = :resque
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "sidekiq/api"
|
require "sidekiq/api"
|
||||||
|
|
||||||
require "sidekiq/testing"
|
require "sidekiq/testing"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "sneakers/runner"
|
require "sneakers/runner"
|
||||||
require "sneakers/publisher"
|
require "sneakers/publisher"
|
||||||
require "timeout"
|
require "timeout"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module SuckerPunchJobsManager
|
module SuckerPunchJobsManager
|
||||||
def setup
|
def setup
|
||||||
ActiveJob::Base.queue_adapter = :sucker_punch
|
ActiveJob::Base.queue_adapter = :sucker_punch
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
if ENV["AJ_ADAPTER"] == "delayed_job"
|
if ENV["AJ_ADAPTER"] == "delayed_job"
|
||||||
generate "delayed_job:active_record", "--quiet"
|
generate "delayed_job:active_record", "--quiet"
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
puts "\n\n*** rake aj:integration:#{ENV['AJ_ADAPTER']} ***\n"
|
puts "\n\n*** rake aj:integration:#{ENV['AJ_ADAPTER']} ***\n"
|
||||||
|
|
||||||
ENV["RAILS_ENV"] = "test"
|
ENV["RAILS_ENV"] = "test"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class JobsManager
|
class JobsManager
|
||||||
@@managers = {}
|
@@managers = {}
|
||||||
attr :adapter_name
|
attr :adapter_name
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "active_support/core_ext/string/inflections"
|
require "active_support/core_ext/string/inflections"
|
||||||
require "support/integration/jobs_manager"
|
require "support/integration/jobs_manager"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module JobBuffer
|
module JobBuffer
|
||||||
class << self
|
class << self
|
||||||
def clear
|
def clear
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "que"
|
require "que"
|
||||||
|
|
||||||
Que::Job.class_eval do
|
Que::Job.class_eval do
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "queue_classic"
|
require "queue_classic"
|
||||||
|
|
||||||
module QC
|
module QC
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "sneakers"
|
require "sneakers"
|
||||||
|
|
||||||
module Sneakers
|
module Sneakers
|
||||||
|
|
Loading…
Reference in a new issue