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:
@@ -1,5 +1,6 @@
|
||||
import {Canonical} from './Canonical'
|
||||
import {Singleton} from '../di'
|
||||
import {Maybe} from '../util'
|
||||
|
||||
/**
|
||||
* Error throw when a duplicate canonical key is registered.
|
||||
@@ -46,6 +47,17 @@ export class Canon {
|
||||
return this.resources[key] as Canonical<T>
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a canonical item from a fully-qualified canonical name.
|
||||
* This is just a quality-of-life wrapper around `this.resource(...).get(...)`.
|
||||
* @param key
|
||||
*/
|
||||
getFromFullyQualified(key: string): Maybe<any> {
|
||||
const [namespace, ...parts] = key.split('::')
|
||||
const unqualified = parts.join('::')
|
||||
return this.resource(namespace).get(unqualified)
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a canonical resource.
|
||||
* @param {Canonical} unit
|
||||
|
||||
Reference in New Issue
Block a user