Class: Webhookdb::Jobs::OrganizationDatabaseMigrationRun
- Inherits:
-
Object
- Object
- Webhookdb::Jobs::OrganizationDatabaseMigrationRun
- Extended by:
- Async::Job
- Includes:
- Amigo::DurableJob
- Defined in:
- lib/webhookdb/jobs/organization_database_migration_run.rb
Instance Method Summary collapse
Methods included from Async::Job
Methods included from Amigo::DurableJob
enabled?, ensure_jobs_tables, heartbeat, heartbeat!, included, insert_job, lock_job, poll_jobs, reconnect, replace_database_settings, set_database_setting, storage_datasets, unlock_job
Instance Method Details
#_perform(event) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/webhookdb/jobs/organization_database_migration_run.rb', line 12 def _perform(event) dbm = self.lookup_model(Webhookdb::Organization::DatabaseMigration, event) self.( organization_id: dbm.organization.id, organization_name: dbm.organization.name, organization_database_migration_id: dbm.id, ) do dbm.migrate rescue Webhookdb::Organization::DatabaseMigration::MigrationAlreadyFinished self.logger.warn("org_database_migration_already_finished") end end |