feat(storage): add "end" method to storage for cleaning up resources when commands are finished
This commit is contained in:
parent
334e2099bb
commit
703e6f028a
15 changed files with 150 additions and 77 deletions
|
|
@ -74,6 +74,12 @@ export type Storage = {
|
|||
* @param error The error that caused the migration to fail.
|
||||
*/
|
||||
onError(migration: MigrationMetadataFinished, error: SerializedError): Promise<void>;
|
||||
/**
|
||||
* Called when the command is finished or aborted (e.g. by a SIGTERM or SIGINT signal).
|
||||
*
|
||||
* Use this to clean up any resources like database connections or file handles.
|
||||
*/
|
||||
end(): Promise<void>;
|
||||
};
|
||||
|
||||
export type EmigrateStorage = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue