mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Added the ability to do Sequential Scans (#3378)
* Added the ability to do Seqential Scans * Modify pkg/txn to run hooks with the outer context, instead of the context that was in a transaction * update in application manual
This commit is contained in:
@@ -35,19 +35,19 @@ func executeHooks(ctx context.Context, hooks []TxnFunc) {
|
||||
}
|
||||
}
|
||||
|
||||
func executePostCommitHooks(ctx context.Context) {
|
||||
func executePostCommitHooks(ctx context.Context, outerCtx context.Context) {
|
||||
m := hookManagerCtx(ctx)
|
||||
executeHooks(ctx, m.postCommitHooks)
|
||||
executeHooks(outerCtx, m.postCommitHooks)
|
||||
}
|
||||
|
||||
func executePostRollbackHooks(ctx context.Context) {
|
||||
func executePostRollbackHooks(ctx context.Context, outerCtx context.Context) {
|
||||
m := hookManagerCtx(ctx)
|
||||
executeHooks(ctx, m.postRollbackHooks)
|
||||
executeHooks(outerCtx, m.postRollbackHooks)
|
||||
}
|
||||
|
||||
func executePostCompleteHooks(ctx context.Context) {
|
||||
func executePostCompleteHooks(ctx context.Context, outerCtx context.Context) {
|
||||
m := hookManagerCtx(ctx)
|
||||
executeHooks(ctx, m.postCompleteHooks)
|
||||
executeHooks(outerCtx, m.postCompleteHooks)
|
||||
}
|
||||
|
||||
func AddPostCommitHook(ctx context.Context, hook TxnFunc) {
|
||||
|
||||
Reference in New Issue
Block a user