Add support for jobs & queueables, migrations
- Create migration directives & migrators - Modify Cache classes to support array manipulation - Create Redis unit and RedisCache implementation - Create Queueable base class and Queue class that uses Cache backend
This commit is contained in:
@@ -3,10 +3,10 @@ import {Awaitable, collect, ErrorWithContext} from '../../util'
|
||||
import {Migration} from './Migration'
|
||||
import {Migrations} from '../services/Migrations'
|
||||
import {EventBus} from '../../event/EventBus'
|
||||
import {ApplyingMigrationEvent} from './events/ApplyingMigrationEvent'
|
||||
import {AppliedMigrationEvent} from './events/AppliedMigrationEvent'
|
||||
import {RollingBackMigrationEvent} from './events/RollingBackMigrationEvent'
|
||||
import {RolledBackMigrationEvent} from './events/RolledBackMigrationEvent'
|
||||
// import {ApplyingMigrationEvent} from './events/ApplyingMigrationEvent'
|
||||
// import {AppliedMigrationEvent} from './events/AppliedMigrationEvent'
|
||||
// import {RollingBackMigrationEvent} from './events/RollingBackMigrationEvent'
|
||||
// import {RolledBackMigrationEvent} from './events/RolledBackMigrationEvent'
|
||||
import {NothingToMigrateError} from './NothingToMigrateError'
|
||||
|
||||
/**
|
||||
@@ -259,8 +259,8 @@ export abstract class Migrator {
|
||||
* @protected
|
||||
*/
|
||||
protected async applying(migration: Migration): Promise<void> {
|
||||
const event = <ApplyingMigrationEvent> this.injector.make(ApplyingMigrationEvent, migration)
|
||||
await this.bus.dispatch(event)
|
||||
// const event = <ApplyingMigrationEvent> this.injector.make(ApplyingMigrationEvent, migration)
|
||||
// await this.bus.dispatch(event)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -269,8 +269,8 @@ export abstract class Migrator {
|
||||
* @protected
|
||||
*/
|
||||
protected async applied(migration: Migration): Promise<void> {
|
||||
const event = <AppliedMigrationEvent> this.injector.make(AppliedMigrationEvent, migration)
|
||||
await this.bus.dispatch(event)
|
||||
// const event = <AppliedMigrationEvent> this.injector.make(AppliedMigrationEvent, migration)
|
||||
// await this.bus.dispatch(event)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -279,8 +279,8 @@ export abstract class Migrator {
|
||||
* @protected
|
||||
*/
|
||||
protected async rollingBack(migration: Migration): Promise<void> {
|
||||
const event = <RollingBackMigrationEvent> this.injector.make(RollingBackMigrationEvent, migration)
|
||||
await this.bus.dispatch(event)
|
||||
// const event = <RollingBackMigrationEvent> this.injector.make(RollingBackMigrationEvent, migration)
|
||||
// await this.bus.dispatch(event)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -289,7 +289,7 @@ export abstract class Migrator {
|
||||
* @protected
|
||||
*/
|
||||
protected async rolledBack(migration: Migration): Promise<void> {
|
||||
const event = <RolledBackMigrationEvent> this.injector.make(RolledBackMigrationEvent, migration)
|
||||
await this.bus.dispatch(event)
|
||||
// const event = <RolledBackMigrationEvent> this.injector.make(RolledBackMigrationEvent, migration)
|
||||
// await this.bus.dispatch(event)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user