Module: MaintenanceTasks
- Defined in:
- lib/maintenance_tasks.rb,
lib/maintenance_tasks/cli.rb,
lib/maintenance_tasks/engine.rb,
app/models/maintenance_tasks/run.rb,
app/models/maintenance_tasks/task.rb,
app/jobs/maintenance_tasks/task_job.rb,
app/models/maintenance_tasks/runner.rb,
app/models/maintenance_tasks/ticker.rb,
app/models/maintenance_tasks/progress.rb,
app/models/maintenance_tasks/runs_page.rb,
app/helpers/maintenance_tasks/tasks_helper.rb,
app/models/maintenance_tasks/task_data_show.rb,
app/models/maintenance_tasks/task_data_index.rb,
app/models/maintenance_tasks/application_record.rb,
lib/generators/maintenance_tasks/task_generator.rb,
app/helpers/maintenance_tasks/application_helper.rb,
app/controllers/maintenance_tasks/runs_controller.rb,
app/controllers/maintenance_tasks/tasks_controller.rb,
app/models/maintenance_tasks/no_collection_builder.rb,
lib/generators/maintenance_tasks/install_generator.rb,
app/models/maintenance_tasks/csv_collection_builder.rb,
app/jobs/concerns/maintenance_tasks/task_job_concern.rb,
app/models/maintenance_tasks/null_collection_builder.rb,
app/validators/maintenance_tasks/run_status_validator.rb,
app/controllers/maintenance_tasks/application_controller.rb,
app/models/maintenance_tasks/batch_csv_collection_builder.rb
Overview
The engine’s namespace module. It provides isolation between the host application’s code and the engine-specific code. Top-level engine constants and variables are defined under this module.
Defined Under Namespace
Modules: ApplicationHelper, Runner, TaskJobConcern, TasksHelper Classes: ApplicationController, ApplicationRecord, BatchCsvCollectionBuilder, CLI, CsvCollectionBuilder, Engine, InstallGenerator, NoCollectionBuilder, NullCollectionBuilder, Progress, Run, RunStatusValidator, RunsController, RunsPage, Task, TaskDataIndex, TaskDataShow, TaskGenerator, TaskJob, TasksController, Ticker
Class Attribute Summary collapse
-
.active_storage_service ⇒ Symbol
The Active Storage service to use for uploading CSV file blobs.
-
.backtrace_cleaner ⇒ ActiveSupport::BacktraceCleaner?
The Active Support backtrace cleaner that will be used to clean the backtrace of a Task that errors.
-
.error_handler ⇒ Proc
The callback to perform when an error occurs in the Task.
-
.job ⇒ String
The name of the job to be used to perform Tasks.
-
.parent_controller ⇒ String
The parent controller all web UI controllers will inherit from.
-
.stuck_task_duration ⇒ ActiveSupport::Duration
The duration after which a task is considered stuck and can be force cancelled.
-
.tasks_module ⇒ String
The module to namespace Tasks in, as a String.
-
.ticker_delay ⇒ ActiveSupport::Duration, Numeric
The delay between updates to the tick count.
Instance Attribute Summary collapse
Class Attribute Details
.active_storage_service ⇒ Symbol
The Active Storage service to use for uploading CSV file blobs.
54 |
# File 'lib/maintenance_tasks.rb', line 54 mattr_accessor :active_storage_service |
.backtrace_cleaner ⇒ ActiveSupport::BacktraceCleaner?
The Active Support backtrace cleaner that will be used to clean the backtrace of a Task that errors.
64 |
# File 'lib/maintenance_tasks.rb', line 64 mattr_accessor :backtrace_cleaner |
.error_handler ⇒ Proc
The callback to perform when an error occurs in the Task. See the README for details.
73 74 |
# File 'lib/maintenance_tasks.rb', line 73 mattr_accessor :error_handler, default: ->(_error, _task_context, _errored_element) {} |
.job ⇒ String
The name of the job to be used to perform Tasks. Defaults to ‘“MaintenanceTasks::TaskJob”`. This job must be either a class that inherits from TaskJob or a class that includes TaskJobConcern.
32 |
# File 'lib/maintenance_tasks.rb', line 32 mattr_accessor :job, default: "MaintenanceTasks::TaskJob" |
.parent_controller ⇒ String
The parent controller all web UI controllers will inherit from. Must be a class that inherits from ‘ActionController::Base`. Defaults to `“ActionController::Base”`
84 |
# File 'lib/maintenance_tasks.rb', line 84 mattr_accessor :parent_controller, default: "ActionController::Base" |
.stuck_task_duration ⇒ ActiveSupport::Duration
The duration after which a task is considered stuck and can be force cancelled.
98 |
# File 'lib/maintenance_tasks.rb', line 98 mattr_accessor :stuck_task_duration, default: 5.minutes |
.tasks_module ⇒ String
The module to namespace Tasks in, as a String. Defaults to ‘Maintenance’.
22 |
# File 'lib/maintenance_tasks.rb', line 22 mattr_accessor :tasks_module, default: "Maintenance" |
.ticker_delay ⇒ ActiveSupport::Duration, Numeric
The delay between updates to the tick count. After each iteration, the progress of the Task may be updated. This duration in seconds limits these updates, skipping if the duration since the last update is lower than this value, except if the job is interrupted, in which case the progress will always be recorded.
45 |
# File 'lib/maintenance_tasks.rb', line 45 mattr_accessor :ticker_delay, default: 1.second |
Instance Attribute Details
#metadata ⇒ Object
91 |
# File 'lib/maintenance_tasks.rb', line 91 mattr_accessor :metadata, default: nil |