提交 aa28c5ca 编写于 作者: K Koichi ITO

[Active Job] `rubocop -a --only Layout/EmptyLineAfterMagicComment`

上级 ac717d65
# frozen_string_literal: true
require "rake/testtask"
#TODO: add qu back to the list after it support Rails 5.1
......
# frozen_string_literal: true
version = File.read(File.expand_path("../RAILS_VERSION", __dir__)).strip
Gem::Specification.new do |s|
......
# frozen_string_literal: true
#--
# Copyright (c) 2014-2017 David Heinemeier Hansson
#
......
# frozen_string_literal: true
require "active_support/core_ext/hash"
module ActiveJob
......
# frozen_string_literal: true
require_relative "core"
require_relative "queue_adapter"
require_relative "queue_name"
......
# frozen_string_literal: true
require "active_support/callbacks"
module ActiveJob
......
# frozen_string_literal: true
module ActiveJob
class ConfiguredJob #:nodoc:
def initialize(job_class, options = {})
......
# frozen_string_literal: true
module ActiveJob
# Provides general behavior that will be included into every Active Job
# object that inherits from ActiveJob::Base.
......
# frozen_string_literal: true
require_relative "arguments"
module ActiveJob
......
# frozen_string_literal: true
require "active_support/core_ext/numeric/time"
module ActiveJob
......
# frozen_string_literal: true
require "active_support/rescuable"
require_relative "arguments"
......
# frozen_string_literal: true
module ActiveJob
# Returns the version of the currently loaded Active Job as a <tt>Gem::Version</tt>
def self.gem_version
......
# frozen_string_literal: true
require "active_support/core_ext/hash/transform_values"
require "active_support/core_ext/string/filters"
require "active_support/tagged_logging"
......
# frozen_string_literal: true
require "active_support/core_ext/string/inflections"
module ActiveJob
......
# frozen_string_literal: true
module ActiveJob
# == Active Job adapters
#
......
# frozen_string_literal: true
require "securerandom"
require "concurrent/scheduled_task"
require "concurrent/executor/thread_pool_executor"
......
# frozen_string_literal: true
require "backburner"
module ActiveJob
......
# frozen_string_literal: true
require "delayed_job"
module ActiveJob
......
# frozen_string_literal: true
module ActiveJob
module QueueAdapters
# == Active Job Inline adapter
......
# frozen_string_literal: true
require "qu"
module ActiveJob
......
# frozen_string_literal: true
require "que"
module ActiveJob
......
# frozen_string_literal: true
require "queue_classic"
module ActiveJob
......
# frozen_string_literal: true
require "resque"
require "active_support/core_ext/enumerable"
require "active_support/core_ext/array/access"
......
# frozen_string_literal: true
require "sidekiq"
module ActiveJob
......
# frozen_string_literal: true
require "sneakers"
require "monitor"
......
# frozen_string_literal: true
require "sucker_punch"
module ActiveJob
......
# frozen_string_literal: true
module ActiveJob
module QueueAdapters
# == Test adapter for Active Job
......
# frozen_string_literal: true
module ActiveJob
module QueueName
extend ActiveSupport::Concern
......
# frozen_string_literal: true
module ActiveJob
module QueuePriority
extend ActiveSupport::Concern
......
# frozen_string_literal: true
require "global_id/railtie"
require "active_job"
......
# frozen_string_literal: true
require "active_support/test_case"
module ActiveJob
......
# frozen_string_literal: true
require "active_support/core_ext/class/subclasses"
require "active_support/core_ext/hash/keys"
......
# frozen_string_literal: true
module ActiveJob
module Translation #:nodoc:
extend ActiveSupport::Concern
......
# frozen_string_literal: true
require_relative "gem_version"
module ActiveJob
......
# frozen_string_literal: true
require "rails/generators/named_base"
module Rails # :nodoc:
......
# frozen_string_literal: true
ActiveJob::Base.queue_adapter = :async
ActiveJob::Base.queue_adapter.immediate = true
# frozen_string_literal: true
require "support/backburner/inline"
ActiveJob::Base.queue_adapter = :backburner
# frozen_string_literal: true
ActiveJob::Base.queue_adapter = :delayed_job
$LOAD_PATH << File.expand_path("../support/delayed_job", __dir__)
......
# frozen_string_literal: true
ActiveJob::Base.queue_adapter = :inline
# frozen_string_literal: true
require "qu-immediate"
ActiveJob::Base.queue_adapter = :qu
# frozen_string_literal: true
require "support/que/inline"
ActiveJob::Base.queue_adapter = :que
......
# frozen_string_literal: true
require "support/queue_classic/inline"
ActiveJob::Base.queue_adapter = :queue_classic
# frozen_string_literal: true
ActiveJob::Base.queue_adapter = :resque
Resque.inline = true
# frozen_string_literal: true
require "sidekiq/testing/inline"
ActiveJob::Base.queue_adapter = :sidekiq
# frozen_string_literal: true
require "support/sneakers/inline"
ActiveJob::Base.queue_adapter = :sneakers
# frozen_string_literal: true
require "sucker_punch/testing/inline"
ActiveJob::Base.queue_adapter = :sucker_punch
# frozen_string_literal: true
ActiveJob::Base.queue_adapter = :test
ActiveJob::Base.queue_adapter.perform_enqueued_jobs = true
ActiveJob::Base.queue_adapter.perform_enqueued_at_jobs = true
# frozen_string_literal: true
require "helper"
class AdapterTest < ActiveSupport::TestCase
......
# frozen_string_literal: true
require "helper"
require "active_job/arguments"
require "models/person"
......
# frozen_string_literal: true
require "helper"
require "jobs/callback_job"
......
# frozen_string_literal: true
require "helper"
require "jobs/retry_job"
......
# frozen_string_literal: true
require "helper"
require "jobs/gid_job"
require "jobs/hello_job"
......
# frozen_string_literal: true
require "helper"
require "active_support/log_subscriber/test_helper"
require "active_support/core_ext/numeric/time"
......
# frozen_string_literal: true
require "helper"
module ActiveJob
......
# frozen_string_literal: true
require "helper"
require "jobs/hello_job"
require "jobs/logging_job"
......
# frozen_string_literal: true
require "helper"
require "jobs/hello_job"
......
# frozen_string_literal: true
require "helper"
require "jobs/hello_job"
require "active_support/core_ext/numeric/time"
......
# frozen_string_literal: true
require "helper"
require "jobs/rescue_job"
require "models/person"
......
# frozen_string_literal: true
require "helper"
require "jobs/hello_job"
require "jobs/logging_job"
......
# frozen_string_literal: true
require "helper"
require "active_support/core_ext/time"
require "active_support/core_ext/date"
......
# frozen_string_literal: true
require "helper"
require "jobs/translated_hello_job"
......
# frozen_string_literal: true
require "active_job"
require "support/job_buffer"
......
# frozen_string_literal: true
require "helper"
require "jobs/logging_job"
require "jobs/hello_job"
......
# frozen_string_literal: true
class ApplicationJob < ActiveJob::Base
end
# frozen_string_literal: true
class CallbackJob < ActiveJob::Base
before_perform ->(job) { job.history << "CallbackJob ran before_perform" }
after_perform ->(job) { job.history << "CallbackJob ran after_perform" }
......
# frozen_string_literal: true
require_relative "../support/job_buffer"
class GidJob < ActiveJob::Base
......
# frozen_string_literal: true
require_relative "../support/job_buffer"
class HelloJob < ActiveJob::Base
......
# frozen_string_literal: true
require_relative "application_job"
class InheritedJob < ApplicationJob
......
# frozen_string_literal: true
require_relative "../support/job_buffer"
class KwargsJob < ActiveJob::Base
......
# frozen_string_literal: true
class LoggingJob < ActiveJob::Base
def perform(dummy)
logger.info "Dummy, here is it: #{dummy}"
......
# frozen_string_literal: true
class NestedJob < ActiveJob::Base
def perform
LoggingJob.perform_later "NestedJob"
......
# frozen_string_literal: true
class OverriddenLoggingJob < ActiveJob::Base
def perform(dummy)
logger.info "Dummy, here is it: #{dummy}"
......
# frozen_string_literal: true
require_relative "../support/job_buffer"
class ProviderJidJob < ActiveJob::Base
......
# frozen_string_literal: true
class QueueAdapterJob < ActiveJob::Base
self.queue_adapter = :inline
end
# frozen_string_literal: true
require_relative "../support/job_buffer"
class QueueAsJob < ActiveJob::Base
......
# frozen_string_literal: true
require_relative "../support/job_buffer"
class RescueJob < ActiveJob::Base
......
# frozen_string_literal: true
require_relative "../support/job_buffer"
require "active_support/core_ext/integer/inflections"
......
# frozen_string_literal: true
require_relative "../support/job_buffer"
class TranslatedHelloJob < ActiveJob::Base
......
# frozen_string_literal: true
class Person
class RecordNotFound < StandardError; end
......
# frozen_string_literal: true
require "backburner"
Backburner::Worker.class_eval do
......
# frozen_string_literal: true
#copied from https://github.com/collectiveidea/delayed_job/blob/master/spec/delayed/backend/test.rb
require "ostruct"
......
# frozen_string_literal: true
module AsyncJobsManager
def setup
ActiveJob::Base.queue_adapter = :async
......
# frozen_string_literal: true
module BackburnerJobsManager
def setup
ActiveJob::Base.queue_adapter = :backburner
......
# frozen_string_literal: true
require "delayed_job"
require "delayed_job_active_record"
......
# frozen_string_literal: true
module InlineJobsManager
def setup
ActiveJob::Base.queue_adapter = :inline
......
# frozen_string_literal: true
module QuJobsManager
def setup
require "qu-rails"
......
# frozen_string_literal: true
module QueJobsManager
def setup
require "sequel"
......
# frozen_string_literal: true
module QueueClassicJobsManager
def setup
ENV["QC_DATABASE_URL"] ||= "postgres:///active_jobs_qc_int_test"
......
# frozen_string_literal: true
module ResqueJobsManager
def setup
ActiveJob::Base.queue_adapter = :resque
......
# frozen_string_literal: true
require "sidekiq/api"
require "sidekiq/testing"
......
# frozen_string_literal: true
require "sneakers/runner"
require "sneakers/publisher"
require "timeout"
......
# frozen_string_literal: true
module SuckerPunchJobsManager
def setup
ActiveJob::Base.queue_adapter = :sucker_punch
......
# frozen_string_literal: true
if ENV["AJ_ADAPTER"] == "delayed_job"
generate "delayed_job:active_record", "--quiet"
end
......
# frozen_string_literal: true
puts "\n\n*** rake aj:integration:#{ENV['AJ_ADAPTER']} ***\n"
ENV["RAILS_ENV"] = "test"
......
# frozen_string_literal: true
class JobsManager
@@managers = {}
attr :adapter_name
......
# frozen_string_literal: true
require "active_support/core_ext/string/inflections"
require "support/integration/jobs_manager"
......
# frozen_string_literal: true
module JobBuffer
class << self
def clear
......
# frozen_string_literal: true
require "que"
Que::Job.class_eval do
......
# frozen_string_literal: true
require "queue_classic"
module QC
......
# frozen_string_literal: true
require "sneakers"
module Sneakers
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册