repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/lib/good_job/bulk.rb
lib/good_job/bulk.rb
# frozen_string_literal: true require 'active_support/core_ext/module/attribute_accessors_per_thread' module GoodJob module Bulk Error = Class.new(StandardError) # @!attribute [rw] current_buffer # @!scope class # Current buffer of jobs to be enqueued. # @return [GoodJob::Bulk::Buffer, ni...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/lib/good_job/cli.rb
lib/good_job/cli.rb
# frozen_string_literal: true require 'thor' module GoodJob # # Implements the +good_job+ command-line tool, which executes jobs and # provides other utilities. The actual entry point is in +exe/good_job+, but # it just sets up and calls this class. # # The +good_job+ command-line tool is based on Thor, a...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/lib/good_job/notifier.rb
lib/good_job/notifier.rb
# frozen_string_literal: true require 'active_support/core_ext/module/attribute_accessors_per_thread' require 'concurrent/atomic/atomic_boolean' require "concurrent/scheduled_task" require "good_job/notifier/process_heartbeat" module GoodJob # :nodoc: # # Notifiers hook into Postgres LISTEN/NOTIFY functionality t...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/lib/good_job/dependencies.rb
lib/good_job/dependencies.rb
# frozen_string_literal: true module GoodJob # :nodoc: # Extends GoodJob module to track Rails boot dependencies. module Dependencies extend ActiveSupport::Concern included do mattr_accessor :_framework_ready, default: false end class_methods do # Whether Rails framework has sufficien...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/lib/good_job/engine.rb
lib/good_job/engine.rb
# frozen_string_literal: true require "rails" module GoodJob # Ruby on Rails integration. class Engine < ::Rails::Engine isolate_namespace GoodJob config.good_job = ActiveSupport::OrderedOptions.new config.good_job.cron = {} initializer "good_job.logger" do |_app| ActiveSupport.on_load(:go...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/lib/good_job/multi_scheduler.rb
lib/good_job/multi_scheduler.rb
# frozen_string_literal: true module GoodJob # Delegates the interface of a single {Scheduler} to multiple Schedulers. class MultiScheduler # Creates MultiScheduler from a GoodJob::Configuration instance. # @param configuration [GoodJob::Configuration] # @param warm_cache_on_initialize [Boolean] # ...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/lib/good_job/notifier/process_heartbeat.rb
lib/good_job/notifier/process_heartbeat.rb
# frozen_string_literal: true module GoodJob # :nodoc: class Notifier # :nodoc: # Extends the Notifier to register the process in the database. module ProcessHeartbeat extend ActiveSupport::Concern included do set_callback :listen, :after, :register_process set_callback :tick, :b...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/lib/good_job/probe_server/not_found_app.rb
lib/good_job/probe_server/not_found_app.rb
# frozen_string_literal: true module GoodJob class ProbeServer module NotFoundApp def self.call(_env) [404, {}, ["Not found"]] end end end end
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/lib/good_job/probe_server/webrick_handler.rb
lib/good_job/probe_server/webrick_handler.rb
# frozen_string_literal: true module GoodJob class ProbeServer class WebrickHandler def initialize(app, options = {}) @app = app @port = options[:port] @logger = options[:logger] # Workaround for rack >= 3.1.x as auto-loading of rack/handler was removed. # We s...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/lib/good_job/probe_server/healthcheck_middleware.rb
lib/good_job/probe_server/healthcheck_middleware.rb
# frozen_string_literal: true module GoodJob class ProbeServer class HealthcheckMiddleware def initialize(app) @app = app end def call(env) case Rack::Request.new(env).path when '/', '/status' [200, {}, ["OK"]] when '/status/started' started ...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/lib/good_job/probe_server/simple_handler.rb
lib/good_job/probe_server/simple_handler.rb
# frozen_string_literal: true module GoodJob class ProbeServer class SimpleHandler SOCKET_READ_TIMEOUT = 5 # in seconds def initialize(app, options = {}) @app = app @port = options[:port] @logger = options[:logger] @running = Concurrent::AtomicBoolean.new(false)...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/lib/good_job/job_performer/metrics.rb
lib/good_job/job_performer/metrics.rb
# frozen_string_literal: true require 'concurrent/atomic/atomic_fixnum' module GoodJob # :nodoc: class JobPerformer # Metrics for the scheduler. class Metrics def initialize @mutex = Mutex.new @empty_executions = Concurrent::AtomicFixnum.new @errored_executions = Concurrent::At...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/lib/good_job/active_job_extensions/batches.rb
lib/good_job/active_job_extensions/batches.rb
# frozen_string_literal: true module GoodJob module ActiveJobExtensions module Batches extend ActiveSupport::Concern included do before_enqueue do |job| GoodJob.logger.debug("#{job.class} was enqueued within a batch or bulk capture block but is not using the GoodJob Adapter; the jo...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/lib/good_job/active_job_extensions/interrupt_errors.rb
lib/good_job/active_job_extensions/interrupt_errors.rb
# frozen_string_literal: true module GoodJob module ActiveJobExtensions module InterruptErrors extend ActiveSupport::Concern included do around_perform do |_job, block| raise InterruptError, "Interrupted after starting perform at '#{CurrentThread.execution_interrupted}'" if Current...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/lib/good_job/active_job_extensions/concurrency.rb
lib/good_job/active_job_extensions/concurrency.rb
# frozen_string_literal: true module GoodJob module ActiveJobExtensions module Concurrency extend ActiveSupport::Concern VALID_TYPES = [String, Symbol, Numeric, Date, Time, TrueClass, FalseClass, NilClass].freeze class ConcurrencyExceededError < StandardError def backtrace [...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/lib/good_job/active_job_extensions/notify_options.rb
lib/good_job/active_job_extensions/notify_options.rb
# frozen_string_literal: true module GoodJob module ActiveJobExtensions # Allows configuring whether GoodJob should emit a NOTIFY event when a job is enqueued. # Configuration will apply either globally to the Job Class, or individually to jobs # on initial enqueue and subsequent retries. # # @ex...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/lib/good_job/active_job_extensions/labels.rb
lib/good_job/active_job_extensions/labels.rb
# frozen_string_literal: true module GoodJob module ActiveJobExtensions module Labels extend ActiveSupport::Concern module Prepends def initialize(...) super self.good_job_labels = Array(self.class.good_job_labels.dup) end def enqueue(options = {}) ...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/lib/good_job/adapter/inline_buffer.rb
lib/good_job/adapter/inline_buffer.rb
# frozen_string_literal: true require 'active_support/core_ext/module/attribute_accessors_per_thread' module GoodJob class Adapter # The InlineBuffer is integrated into the Adapter and captures jobs that have been enqueued inline. # The purpose is allow job records to be persisted, in a locked state, while ...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/lib/generators/good_job/update_generator.rb
lib/generators/good_job/update_generator.rb
# frozen_string_literal: true require 'rails/generators' require 'rails/generators/active_record' module GoodJob # # Rails generator used for updating GoodJob in a Rails application. # Run it with +bin/rails g good_job:update+ in your console. # class UpdateGenerator < Rails::Generators::Base include Ac...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/lib/generators/good_job/install_generator.rb
lib/generators/good_job/install_generator.rb
# frozen_string_literal: true require 'rails/generators' require 'rails/generators/active_record' module GoodJob # # Rails generator used for setting up GoodJob in a Rails application. # Run it with +bin/rails g good_job:install+ in your console. # class InstallGenerator < Rails::Generators::Base includ...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/lib/active_job/queue_adapters/good_job_adapter.rb
lib/active_job/queue_adapters/good_job_adapter.rb
# frozen_string_literal: true module ActiveJob # :nodoc: module QueueAdapters # :nodoc: # See {GoodJob::Adapter} for details. class GoodJobAdapter < GoodJob::Adapter end end end
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/config/routes.rb
config/routes.rb
# frozen_string_literal: true GoodJob::Engine.routes.draw do root 'jobs#redirect_to_index' resources :jobs, only: %i[index show destroy] do collection do get :mass_update, to: redirect(path: 'jobs') put :mass_update end member do put :discard put :force_discard put :resc...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/app/jobs/other_job.rb
demo/app/jobs/other_job.rb
class OtherJob < ApplicationJob JobError = Class.new(StandardError) def perform(*) end end
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/app/jobs/fragile_job.rb
demo/app/jobs/fragile_job.rb
class FragileJob < ApplicationJob FragileError = Class.new(StandardError) FAILURE_RATE = 0.6 def perform raise FragileError if FAILURE_RATE <= rand end end
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/app/jobs/example_job.rb
demo/app/jobs/example_job.rb
class ExampleJob < ApplicationJob ExpectedError = Class.new(StandardError) DeadError = Class.new(StandardError) TYPES = [ SUCCESS_TYPE = 'success', ERROR_ONCE_TYPE = 'error_once', ERROR_FIVE_TIMES_TYPE = 'error_five_times', DEAD_TYPE = 'dead', SLOW_TYPE = 'slow', ] retry_on(DeadError, at...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/app/jobs/application_job.rb
demo/app/jobs/application_job.rb
class ApplicationJob < ActiveJob::Base include( GoodJob::ActiveJobExtensions::Concurrency, GoodJob::ActiveJobExtensions::Labels ) POLYNOMIALLY_LONGER = if ActiveJob.gem_version >= Gem::Version.new("7.1.0.a") :polynomially_longer else ...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/app/jobs/configurable_queue_job.rb
demo/app/jobs/configurable_queue_job.rb
class ConfigurableQueueJob < ApplicationJob queue_as do kword_args = self.arguments.first kword_args.fetch(:queue_as) end def perform end end
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/app/jobs/pg_hero_maintenance_job.rb
demo/app/jobs/pg_hero_maintenance_job.rb
class PgHeroMaintenanceJob < ApplicationJob include GoodJob::ActiveJobExtensions::Concurrency good_job_control_concurrency_with( key: "pg_hero_maintenance", total_limit: 1 ) discard_on StandardError def perform PgHero.capture_query_stats PgHero.clean_query_stats end end
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/app/helpers/application_helper.rb
demo/app/helpers/application_helper.rb
module ApplicationHelper end
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/app/controllers/application_controller.rb
demo/app/controllers/application_controller.rb
class ApplicationController < ActionController::Base protect_from_forgery with: :exception def create_job if params[:wait] wait = params.fetch(:wait, 2).to_i ExampleJob.set(wait: wait).perform_later else ExampleJob.perform_later end render plain: 'ok' end end
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/app/models/application_record.rb
demo/app/models/application_record.rb
class ApplicationRecord < ActiveRecord::Base self.abstract_class = true end
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/app/mailers/application_mailer.rb
demo/app/mailers/application_mailer.rb
class ApplicationMailer < ActionMailer::Base default from: 'from@example.com' layout 'mailer' end
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/app/channels/application_cable/channel.rb
demo/app/channels/application_cable/channel.rb
module ApplicationCable class Channel < ActionCable::Channel::Base end end
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/app/channels/application_cable/connection.rb
demo/app/channels/application_cable/connection.rb
module ApplicationCable class Connection < ActionCable::Connection::Base end end
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/seeds.rb
demo/db/seeds.rb
start_date = 7.days.ago time_increments = (1.minute..10.minutes).to_a job_classes = ['ExampleJob', 'OtherJob'] queue_names = ["default", "mice", "elephants"] jobs_data = [] loop do active_job_id = SecureRandom.uuid job_class = job_classes.sample queue_name = queue_names.sample enqueued_at = start_date seria...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/schema.rb
demo/db/schema.rb
# This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # This file is the source Rails uses to define your schema when running `bin/rai...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/migrate/20240321162554_create_pghero_query_stats.rb
demo/db/migrate/20240321162554_create_pghero_query_stats.rb
class CreatePgheroQueryStats < ActiveRecord::Migration[7.1] def change enable_extension "pg_stat_statements" create_table :pghero_query_stats do |t| t.text :database t.text :user t.text :query t.integer :query_hash, limit: 8 t.float :total_time t.integer :calls, limit: 8 ...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/migrate/20231218003738_remove_good_job_active_id_index.rb
demo/db/migrate/20231218003738_remove_good_job_active_id_index.rb
# frozen_string_literal: true class RemoveGoodJobActiveIdIndex < ActiveRecord::Migration[7.1] disable_ddl_transaction! def change reversible do |dir| dir.up do if connection.index_name_exists?(:good_jobs, :index_good_jobs_on_active_job_id) remove_index :good_jobs, name: :index_good_job...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/migrate/20211230012344_create_good_job_processes.rb
demo/db/migrate/20211230012344_create_good_job_processes.rb
# frozen_string_literal: true class CreateGoodJobProcesses < ActiveRecord::Migration[6.1] def change reversible do |dir| dir.up do # Ensure this incremental update migration is idempotent # with monolithic install migration. return if connection.table_exists?(:good_job_processes) ...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/migrate/20240417093204_create_good_job_execution_error_backtrace.rb
demo/db/migrate/20240417093204_create_good_job_execution_error_backtrace.rb
# frozen_string_literal: true class CreateGoodJobExecutionErrorBacktrace < ActiveRecord::Migration[7.1] def change reversible do |dir| dir.up do # Ensure this incremental update migration is idempotent # with monolithic install migration. return if connection.column_exists?(:good_jo...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/migrate/20200224015928_create_good_jobs.rb
demo/db/migrate/20200224015928_create_good_jobs.rb
# frozen_string_literal: true class CreateGoodJobs < ActiveRecord::Migration[5.2] def change enable_extension 'pgcrypto' create_table :good_jobs, id: :uuid do |t| t.text :queue_name t.integer :priority t.jsonb :serialized_params t.datetime :scheduled_at t.datetime :performed_at ...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/migrate/20210623192050_add_active_job_id_concurrency_key_cron_key_to_good_jobs.rb
demo/db/migrate/20210623192050_add_active_job_id_concurrency_key_cron_key_to_good_jobs.rb
# frozen_string_literal: true class AddActiveJobIdConcurrencyKeyCronKeyToGoodJobs < ActiveRecord::Migration[5.2] def change reversible do |dir| dir.up do # Ensure this incremental update migration is idempotent # with monolithic install migration. return if connection.column_exists?(...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/migrate/20240613151310_create_good_job_execution_duration.rb
demo/db/migrate/20240613151310_create_good_job_execution_duration.rb
# frozen_string_literal: true class CreateGoodJobExecutionDuration < ActiveRecord::Migration[7.1] def change reversible do |dir| dir.up do # Ensure this incremental update migration is idempotent # with monolithic install migration. return if connection.column_exists?(:good_job_exec...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/migrate/20210815160735_add_retried_good_job_id_to_good_jobs.rb
demo/db/migrate/20210815160735_add_retried_good_job_id_to_good_jobs.rb
# frozen_string_literal: true class AddRetriedGoodJobIdToGoodJobs < ActiveRecord::Migration[5.2] def change reversible do |dir| dir.up do # Ensure this incremental update migration is idempotent # with monolithic install migration. return if connection.column_exists?(:good_jobs, :ret...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/migrate/20230131214927_create_good_job_batches.rb
demo/db/migrate/20230131214927_create_good_job_batches.rb
# frozen_string_literal: true class CreateGoodJobBatches < ActiveRecord::Migration[7.1] def change reversible do |dir| dir.up do # Ensure this incremental update migration is idempotent # with monolithic install migration. return if connection.table_exists?(:good_job_batches) ...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/migrate/20220102200139_index_good_job_jobs_on_finished_at.rb
demo/db/migrate/20220102200139_index_good_job_jobs_on_finished_at.rb
# frozen_string_literal: true class IndexGoodJobJobsOnFinishedAt < ActiveRecord::Migration[6.1] disable_ddl_transaction! def change reversible do |dir| dir.up do # Ensure this incremental update migration is idempotent # with monolithic install migration. return if connection.inde...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/migrate/20250217090233_add_index_good_jobs_concurrency_key_created_at.rb
demo/db/migrate/20250217090233_add_index_good_jobs_concurrency_key_created_at.rb
# frozen_string_literal: true class AddIndexGoodJobsConcurrencyKeyCreatedAt < ActiveRecord::Migration[7.1] disable_ddl_transaction! def change add_index :good_jobs, [:concurrency_key, :created_at], algorithm: :concurrently end end
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/migrate/20211011221037_add_cron_at_to_good_jobs.rb
demo/db/migrate/20211011221037_add_cron_at_to_good_jobs.rb
# frozen_string_literal: true class AddCronAtToGoodJobs < ActiveRecord::Migration[5.2] def change reversible do |dir| dir.up do # Ensure this incremental update migration is idempotent # with monolithic install migration. return if connection.column_exists?(:good_jobs, :cron_at) ...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/migrate/20231216183915_create_good_job_labels_index.rb
demo/db/migrate/20231216183915_create_good_job_labels_index.rb
# frozen_string_literal: true class CreateGoodJobLabelsIndex < ActiveRecord::Migration[7.1] disable_ddl_transaction! def change reversible do |dir| dir.up do unless connection.index_name_exists?(:good_jobs, :index_good_jobs_on_labels) add_index :good_jobs, :labels, using: :gin, where: ...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/migrate/20220720154438_create_good_job_settings.rb
demo/db/migrate/20220720154438_create_good_job_settings.rb
# frozen_string_literal: true class CreateGoodJobSettings < ActiveRecord::Migration[6.1] def change create_table :good_job_settings, id: :uuid do |t| t.timestamps t.text :key t.jsonb :value t.index :key, unique: true end end end
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/migrate/20230412144442_create_good_job_executions.rb
demo/db/migrate/20230412144442_create_good_job_executions.rb
# frozen_string_literal: true class CreateGoodJobExecutions < ActiveRecord::Migration[7.1] def change reversible do |dir| dir.up do # Ensure this incremental update migration is idempotent # with monolithic install migration. return if connection.table_exists?(:good_job_executions) ...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/migrate/20210623192051_add_active_job_id_index_and_concurrency_key_index_to_good_jobs.rb
demo/db/migrate/20210623192051_add_active_job_id_index_and_concurrency_key_index_to_good_jobs.rb
# frozen_string_literal: true class AddActiveJobIdIndexAndConcurrencyKeyIndexToGoodJobs < ActiveRecord::Migration[5.2] disable_ddl_transaction! UPDATE_BATCH_SIZE = 1_000 def change reversible do |dir| dir.up do # Ensure this incremental update migration is idempotent # with monolithic ...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/migrate/20240518175057_create_good_job_process_lock_ids.rb
demo/db/migrate/20240518175057_create_good_job_process_lock_ids.rb
# frozen_string_literal: true class CreateGoodJobProcessLockIds < ActiveRecord::Migration[7.1] def change reversible do |dir| dir.up do # Ensure this incremental update migration is idempotent # with monolithic install migration. return if connection.column_exists?(:good_jobs, :lock...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/migrate/20231216183914_create_good_job_labels.rb
demo/db/migrate/20231216183914_create_good_job_labels.rb
# frozen_string_literal: true class CreateGoodJobLabels < ActiveRecord::Migration[7.1] def change reversible do |dir| dir.up do # Ensure this incremental update migration is idempotent # with monolithic install migration. return if connection.column_exists?(:good_jobs, :labels) ...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/migrate/20240801143343_add_jobs_finished_at_to_good_job_batches.rb
demo/db/migrate/20240801143343_add_jobs_finished_at_to_good_job_batches.rb
# frozen_string_literal: true class AddJobsFinishedAtToGoodJobBatches < ActiveRecord::Migration[7.1] def change reversible do |dir| dir.up do # Ensure this incremental update migration is idempotent # with monolithic install migration. return if connection.column_exists?(:good_job_b...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/migrate/20240114223450_create_index_good_job_jobs_for_candidate_lookup.rb
demo/db/migrate/20240114223450_create_index_good_job_jobs_for_candidate_lookup.rb
# frozen_string_literal: true class CreateIndexGoodJobJobsForCandidateLookup < ActiveRecord::Migration[7.1] disable_ddl_transaction! def change reversible do |dir| dir.up do # Ensure this incremental update migration is idempotent # with monolithic install migration. return if co...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/migrate/20230703035750_create_good_jobs_error_event.rb
demo/db/migrate/20230703035750_create_good_jobs_error_event.rb
# frozen_string_literal: true class CreateGoodJobsErrorEvent < ActiveRecord::Migration[7.1] def change reversible do |dir| dir.up do # Ensure this incremental update migration is idempotent # with monolithic install migration. return if connection.column_exists?(:good_jobs, :error_e...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/migrate/20231128075428_recreate_good_job_cron_indexes_with_conditional.rb
demo/db/migrate/20231128075428_recreate_good_job_cron_indexes_with_conditional.rb
# frozen_string_literal: true class RecreateGoodJobCronIndexesWithConditional < ActiveRecord::Migration[7.1] disable_ddl_transaction! def change reversible do |dir| dir.up do unless connection.index_name_exists?(:good_jobs, :index_good_jobs_on_cron_key_and_created_at_cond) add_index :g...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/migrate/20240518175058_create_good_job_process_lock_indexes.rb
demo/db/migrate/20240518175058_create_good_job_process_lock_indexes.rb
# frozen_string_literal: true class CreateGoodJobProcessLockIndexes < ActiveRecord::Migration[7.1] disable_ddl_transaction! def change reversible do |dir| dir.up do unless connection.index_name_exists?(:good_jobs, :index_good_jobs_on_priority_scheduled_at_unfinished_unlocked) add_index...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/migrate/20250827141455_add_index_good_jobs_job_class.rb
demo/db/migrate/20250827141455_add_index_good_jobs_job_class.rb
class AddIndexGoodJobsJobClass < ActiveRecord::Migration[7.1] disable_ddl_transaction! def change add_index :good_jobs, :job_class, algorithm: :concurrently end end
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/migrate/20211011221038_add_cron_key_cron_at_index_to_good_jobs.rb
demo/db/migrate/20211011221038_add_cron_key_cron_at_index_to_good_jobs.rb
# frozen_string_literal: true class AddCronKeyCronAtIndexToGoodJobs < ActiveRecord::Migration[5.2] disable_ddl_transaction! def change reversible do |dir| dir.up do # Ensure this incremental update migration is idempotent # with monolithic install migration. return if connection.i...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/migrate/20250918235018_add_index_good_jobs_finished_at_for_cleanup.rb
demo/db/migrate/20250918235018_add_index_good_jobs_finished_at_for_cleanup.rb
# frozen_string_literal: true class AddIndexGoodJobsFinishedAtForCleanup < ActiveRecord::Migration[7.1] disable_ddl_transaction! def change reversible do |dir| dir.up do # Ensure this incremental update migration is idempotent # with monolithic install migration. return if connec...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/migrate/20221019021425_create_index_good_jobs_jobs_on_priority_created_at_when_unfinished.rb
demo/db/migrate/20221019021425_create_index_good_jobs_jobs_on_priority_created_at_when_unfinished.rb
# frozen_string_literal: true class CreateIndexGoodJobsJobsOnPriorityCreatedAtWhenUnfinished < ActiveRecord::Migration[6.1] disable_ddl_transaction! def change reversible do |dir| dir.up do # Ensure this incremental update migration is idempotent # with monolithic install migration. ...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/db/migrate/20250919000200_remove_extraneous_finished_at_index.rb
demo/db/migrate/20250919000200_remove_extraneous_finished_at_index.rb
# frozen_string_literal: true class RemoveExtraneousFinishedAtIndex < ActiveRecord::Migration[7.1] disable_ddl_transaction! def change reversible do |dir| dir.up do # Ensure this incremental update migration is idempotent # with monolithic install migration. return unless connect...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/lib/thread_name_formatter.rb
demo/lib/thread_name_formatter.rb
# frozen_string_literal: true class ThreadNameFormatter < ActiveSupport::Logger::SimpleFormatter def call(severity, timestamp, _progname, message) prefix = [emoji_hash(Thread.current.name), Thread.current.name, emoji_hash(Thread.current.name)].compact.join(" ") "#{ActiveSupport::LogSubscriber.new.send(:color,...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/config/application.rb
demo/config/application.rb
require_relative 'boot' require 'logger' # Before rails: https://github.com/rails/rails/pull/54264 require 'rails/all' require "good_job" require "good_job/engine" Bundler.require(*Rails.groups) require_relative "../lib/thread_name_formatter" module TestApp class Application < Rails::Application # Initialize ...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/config/environment.rb
demo/config/environment.rb
# Load the Rails application. require_relative 'application' # Initialize the Rails application. Rails.application.initialize!
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/config/puma.rb
demo/config/puma.rb
# Puma can serve each request in a thread from an internal thread pool. # The `threads` method setting takes two numbers: a minimum and maximum. # Any libraries that use thread pools should be configured to match # the maximum value specified for Puma. Default is set to 5 threads for minimum # and maximum; this matches...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/config/routes.rb
demo/config/routes.rb
Rails.application.routes.draw do root to: redirect('/good_job') mount GoodJob::Engine => "/good_job" get :create_job, to: 'application#create_job' mount PgHero::Engine, at: "pghero" if defined?(PgHero) end
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/config/boot.rb
demo/config/boot.rb
# Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __dir__) require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) begin require 'bootsnap/setup' rescue LoadError nil end $LOAD_PATH.unshift File.expand_path('../../lib', __dir__)
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/config/initializers/content_security_policy.rb
demo/config/initializers/content_security_policy.rb
# Be sure to restart your server when you modify this file. # Define an application-wide content security policy # For further information see the following documentation # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy # Rails.application.config.content_security_policy do |policy| ...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/config/initializers/filter_parameter_logging.rb
demo/config/initializers/filter_parameter_logging.rb
# Be sure to restart your server when you modify this file. # Configure sensitive parameters which will be filtered from the log file. Rails.application.config.filter_parameters += [:password]
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/config/initializers/application_controller_renderer.rb
demo/config/initializers/application_controller_renderer.rb
# Be sure to restart your server when you modify this file. # ActiveSupport::Reloader.to_prepare do # ApplicationController.renderer.defaults.merge!( # http_host: 'example.org', # https: false # ) # end
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/config/initializers/skylight.rb
demo/config/initializers/skylight.rb
# frozen_string_literal: true if defined?(Skylight) module SkylightSample CAPTURE_PERCENT = Integer(ENV.fetch("SKYLIGHT_SAMPLE_PERCENT", 100)) def call(env) if rand(100) < CAPTURE_PERCENT super else @app.call(env) end end end Skylight::Middleware.prepend SkylightSa...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/config/initializers/good_job.rb
demo/config/initializers/good_job.rb
Rails.application.configure do config.good_job.enable_pauses = true config.good_job.cron = { example: { cron: '*/5 * * * * *', # every 5 seconds class: 'ExampleJob', description: "Enqueue ExampleJob every 5 seconds", }, } end Rails.configuration.after_initialize do # TODO: It should n...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/config/initializers/postgres.rb
demo/config/initializers/postgres.rb
# Output Postgres notifications through Rails.logger instead of stderr if Rails.env.development? ActiveSupport.on_load :active_record do ActiveRecord::ConnectionAdapters::AbstractAdapter.set_callback :checkout, :before, lambda { |conn| raw_connection = conn.raw_connection next unless raw_connection.re...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/config/initializers/activerecord_explain_analyze.rb
demo/config/initializers/activerecord_explain_analyze.rb
# frozen_string_literal: true ActiveSupport.on_load(:active_record) do begin require 'activerecord-explain-analyze' rescue LoadError next # ignore end module ActiveRecordExplainAnalyze module Relation def explain_force_index(analyze: false, format: :text) ActiveRecord::Base.connectio...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/config/initializers/rbtrace.rb
demo/config/initializers/rbtrace.rb
if ENV['RBTRACE'] require 'rbtrace' $stdout.puts "Enabled rbtrace. Example commands:" $stdout.puts " Show all method calls: $ bundle exec rbtrace --pid #{Process.pid} --firehose" $stdout.puts " Debug Rails deadlock: $ bundle exec rbtrace --pid #{Process.pid} --eval \"puts output = ActionDispatch::DebugLocks....
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/config/initializers/wrap_parameters.rb
demo/config/initializers/wrap_parameters.rb
# Be sure to restart your server when you modify this file. # This file contains settings for ActionController::ParamsWrapper which # is enabled by default. # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:action_controller) do wrap_parameters f...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/config/initializers/inflections.rb
demo/config/initializers/inflections.rb
# Be sure to restart your server when you modify this file. # Add new inflection rules using the following format. Inflections # are locale specific, and you may define rules for as many different # locales as you wish. All of these examples are active by default: # ActiveSupport::Inflector.inflections(:en) do |inflec...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/config/initializers/cookies_serializer.rb
demo/config/initializers/cookies_serializer.rb
# Be sure to restart your server when you modify this file. # Specify a serializer for the signed and encrypted cookie jars. # Valid options are :json, :marshal, and :hybrid. Rails.application.config.action_dispatch.cookies_serializer = :json
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/config/initializers/rack_mini_profiler.rb
demo/config/initializers/rack_mini_profiler.rb
if defined?(Rack::MiniProfiler) Rack::MiniProfiler.config.skip_paths.push( "/favicon.ico", "/good_job/frontend/" ) end
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/config/initializers/assets.rb
demo/config/initializers/assets.rb
# Be sure to restart your server when you modify this file. # Version of your assets, change this if you want to expire all your assets. # Rails.application.config.assets.version = '1.0' # Add additional assets to the asset load path. # Rails.application.config.assets.paths << Emoji.images_path # Precompile addition...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/config/initializers/backtrace_silencers.rb
demo/config/initializers/backtrace_silencers.rb
# Be sure to restart your server when you modify this file. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } # You can also remove all the silencers if you're trying to debug a probl...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/config/initializers/mime_types.rb
demo/config/initializers/mime_types.rb
# Be sure to restart your server when you modify this file. # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/config/environments/test.rb
demo/config/environments/test.rb
# The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped # and recreated between test runs. Don't rely on the data there! Rails.application.configure do config.cac...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/config/environments/demo.rb
demo/config/environments/demo.rb
require_relative 'production'
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/config/environments/development.rb
demo/config/environments/development.rb
Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the web serv...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
bensheldon/good_job
https://github.com/bensheldon/good_job/blob/33c0174607c0c885597bab2b8f63a6a6276d2f0e/demo/config/environments/production.rb
demo/config/environments/production.rb
Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded web serve...
ruby
MIT
33c0174607c0c885597bab2b8f63a6a6276d2f0e
2026-01-04T15:52:28.507710Z
false
github/janky
https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/test/github_status_test.rb
test/github_status_test.rb
require File.expand_path("../test_helper", __FILE__) class GithubStatusTest < Test::Unit::TestCase def stub_build @stub_build = stub(:repo_nwo => "github/janky", :sha1 => "xxxx", :green? => true, :number => 1, :duration => 1, :repository => stub(:context => "ci/janky"), :web_u...
ruby
MIT
e2e76cc4c3b1421688b9a4feb77ffc5df761562e
2026-01-04T15:53:08.554244Z
false
github/janky
https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/test/repository_test.rb
test/repository_test.rb
require File.expand_path("../test_helper", __FILE__) class RepositoryTest < Test::Unit::TestCase def setup Janky.setup(environment) Janky.enable_mock! Janky.reset! DatabaseCleaner.clean_with(:truncation) end test "job name includes repo name" do repo = Janky::Repository.setup("github/janky"...
ruby
MIT
e2e76cc4c3b1421688b9a4feb77ffc5df761562e
2026-01-04T15:53:08.554244Z
false
github/janky
https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/test/janky_test.rb
test/janky_test.rb
require File.expand_path("../test_helper", __FILE__) class JankyTest < Test::Unit::TestCase def setup Janky.setup(environment) Janky.enable_mock! Janky.reset! DatabaseCleaner.clean_with(:truncation) Janky::ChatService.rooms = {1 => "enterprise", "2" => "builds"} Janky::ChatService.default_r...
ruby
MIT
e2e76cc4c3b1421688b9a4feb77ffc5df761562e
2026-01-04T15:53:08.554244Z
false
github/janky
https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/test/test_helper.rb
test/test_helper.rb
$LOAD_PATH.unshift(File.expand_path("../../lib", __FILE__)) require "janky" require "test/unit" require "mocha/setup" require "database_cleaner" class Test::Unit::TestCase def self.test(name, &block) define_method("test_#{name.gsub(/\s+/,'_')}".to_sym, block) end def default_environment { "RACK_ENV" =>...
ruby
MIT
e2e76cc4c3b1421688b9a4feb77ffc5df761562e
2026-01-04T15:53:08.554244Z
false
github/janky
https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/test/commit_test.rb
test/commit_test.rb
require File.expand_path("../test_helper", __FILE__) class CommitTest < Test::Unit::TestCase def setup Janky.setup(environment) Janky.enable_mock! Janky.reset! DatabaseCleaner.clean_with(:truncation) end test "responds to #last_build" do assert_respond_to Janky::Commit.new, :last_build en...
ruby
MIT
e2e76cc4c3b1421688b9a4feb77ffc5df761562e
2026-01-04T15:53:08.554244Z
false
github/janky
https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky.rb
lib/janky.rb
if RUBY_VERSION < "1.9.3" warn "Support for Ruby versions lesser than 1.9.3 is deprecated and will be " \ "removed in Janky 1.0." end require "net/http" require "digest/md5" require "active_record" require "replicate" require "sinatra/base" require "mustache/sinatra" require "yajl" require "yajl/json_gem" requi...
ruby
MIT
e2e76cc4c3b1421688b9a4feb77ffc5df761562e
2026-01-04T15:53:08.554244Z
false
github/janky
https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/repository.rb
lib/janky/repository.rb
module Janky class Repository < ActiveRecord::Base has_many :branches, :dependent => :destroy has_many :commits, :dependent => :destroy has_many :builds, :through => :branches after_commit :delete_hook, :on => :destroy replicate_associations :builds, :commits, :branches default_scope { orde...
ruby
MIT
e2e76cc4c3b1421688b9a4feb77ffc5df761562e
2026-01-04T15:53:08.554244Z
false
github/janky
https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/version.rb
lib/janky/version.rb
module Janky VERSION = "0.13.0.pre1" end
ruby
MIT
e2e76cc4c3b1421688b9a4feb77ffc5df761562e
2026-01-04T15:53:08.554244Z
false
github/janky
https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/build.rb
lib/janky/build.rb
module Janky class Build < ActiveRecord::Base belongs_to :branch belongs_to :commit default_scope do columns = (column_names - ["output"]).map do |column_name| arel_table[column_name] end select(columns) end scope :building, lambda { where("started_at IS NOT NULL...
ruby
MIT
e2e76cc4c3b1421688b9a4feb77ffc5df761562e
2026-01-04T15:53:08.554244Z
false
github/janky
https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/job_creator.rb
lib/janky/job_creator.rb
module Janky class JobCreator def initialize(server_url, callback_url) @server_url = server_url @callback_url = callback_url end def run(name, uri, template_path) creator.run(name, uri, template_path) end def creator @creator ||= Creator.new(HTTP, @server_url, @callback...
ruby
MIT
e2e76cc4c3b1421688b9a4feb77ffc5df761562e
2026-01-04T15:53:08.554244Z
false
github/janky
https://github.com/github/janky/blob/e2e76cc4c3b1421688b9a4feb77ffc5df761562e/lib/janky/github.rb
lib/janky/github.rb
module Janky module GitHub # Setup the GitHub API client and Post-Receive hook endpoint. # # user - API user as a String. # password - API password as a String. # secret - Secret used to sign hook requests from GitHub. # hook_url - String URL that handles Post-Receive requests. # api...
ruby
MIT
e2e76cc4c3b1421688b9a4feb77ffc5df761562e
2026-01-04T15:53:08.554244Z
false