Class: PgCron::Configuration
- Inherits:
-
Object
- Object
- PgCron::Configuration
- Defined in:
- lib/pg_cron/configuration.rb
Constant Summary collapse
- JOBS_DIRECTORY =
Kept for anything still referencing it. PgCron::Definition owns the real path; a literal rather than an interpolation of Definition::DIRECTORY so this does not depend on require order.
"db/cron"
Instance Attribute Summary collapse
-
#adapter ⇒ Object
The adapter used to run cron statements.
Instance Method Summary collapse
-
#connection ⇒ Object
Retained so
PgCronRails.connection-era callers keep working. -
#initialize(adapter: PgCron::Adapters::Postgres.new) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(adapter: PgCron::Adapters::Postgres.new) ⇒ Configuration
Returns a new instance of Configuration.
14 15 16 |
# File 'lib/pg_cron/configuration.rb', line 14 def initialize(adapter: PgCron::Adapters::Postgres.new) @adapter = adapter end |
Instance Attribute Details
#adapter ⇒ Object
The adapter used to run cron statements. Defaults to the Postgres adapter over the application's own connection.
12 13 14 |
# File 'lib/pg_cron/configuration.rb', line 12 def adapter @adapter end |
Instance Method Details
#connection ⇒ Object
Retained so PgCronRails.connection-era callers keep working.
21 22 23 |
# File 'lib/pg_cron/configuration.rb', line 21 def connection adapter end |