Module: JobsDashboard

Extended by:
Storage
Defined in:
lib/jobs_dashboard.rb,
lib/jobs_dashboard/engine.rb,
lib/jobs_dashboard/version.rb,
app/models/jobs_dashboard/job_log.rb,
lib/jobs_dashboard/client_middleware.rb,
lib/jobs_dashboard/server_middleware.rb,
app/models/jobs_dashboard/application_record.rb,
app/helpers/jobs_dashboard/application_helper.rb,
app/controllers/jobs_dashboard/job_logs_controller.rb,
app/controllers/jobs_dashboard/dashboard_controller.rb,
app/controllers/jobs_dashboard/application_controller.rb

Defined Under Namespace

Modules: ApplicationHelper, Storage, Worker Classes: ApplicationController, ApplicationRecord, ClientMiddleware, DashboardController, Engine, JobLog, JobLogsController, ServerMiddleware

Constant Summary collapse

VERSION =
"0.3.4"
DEFAULT_LOCAL_TIME_ZONE =
'Europe/Paris'

Class Method Summary collapse

Class Method Details

.configure_client_middleware(sidekiq_config, client_middleware_options = {}) ⇒ Object

Helper method to easily configure sidekiq-status client middleware whatever the Sidekiq version is.

Parameters:

  • sidekiq_config (Sidekiq)

    the Sidekiq config

  • client_middleware_options (Hash) (defaults to: {})

    client middleware initialization options

Options Hash (client_middleware_options):

  • :expiration (Fixnum)

    ttl for complete jobs



51
52
53
54
55
# File 'lib/jobs_dashboard/client_middleware.rb', line 51

def self.configure_client_middleware(sidekiq_config, client_middleware_options = {})
  sidekiq_config.client_middleware do |chain|
    chain.add JobsDashboard::ClientMiddleware, client_middleware_options
  end
end

.configure_server_middleware(sidekiq_config, server_middleware_options = {}) ⇒ Object

Helper method to easily configure sidekiq-status server middleware whatever the Sidekiq version is.

Parameters:

  • sidekiq_config (Sidekiq)

    the Sidekiq config

  • server_middleware_options (Hash) (defaults to: {})

    server middleware initialization options

Options Hash (server_middleware_options):

  • (Object)


56
57
58
59
60
61
# File 'lib/jobs_dashboard/server_middleware.rb', line 56

def self.configure_server_middleware(sidekiq_config, server_middleware_options = {})
  sidekiq_config.server_middleware do |chain|
    chain.add JobsDashboard::ServerMiddleware, server_middleware_options
  end

end

.setup {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (JobsDashboard)

    the object that the method was called on



14
15
16
# File 'lib/jobs_dashboard/engine.rb', line 14

def self.setup(&block)
  yield self
end