Skip to content

Commit

Permalink
ci: clean
Browse files Browse the repository at this point in the history
  • Loading branch information
waitingsong committed Nov 20, 2024
1 parent 8fdf4cd commit 42b7cfd
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions packages/midway-component-kmore/src/lib/db-hook/db-hook.trx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,11 @@ export class DbHookTrx<SourceName extends string = string> {
// #region transactionPostHook

@TraceLog<DbHookTrx['transactionPostHook']>({
before([options], decoratorContext) {
before([options]) {
const { kmore, config, trx } = options
const { kmoreTrxId } = config
assert(kmoreTrxId, 'transactionPostHook() kmoreTrxId is empty')

void decoratorContext

let attrs: Attributes = {
dbId: kmore.dbId,
kmoreTrxId: kmoreTrxId.toString(),
Expand Down Expand Up @@ -159,11 +157,7 @@ export class DbHookTrx<SourceName extends string = string> {
// #region beforeCommit

@TraceLog<DbHookTrx['beforeCommitHook']>({
after([options], _res, decoratorContext) {
if (! decoratorContext.traceScope) {
decoratorContext.traceScope = this.getTraceScopeByTrx(options.trx)
}

after([options]) {
const activeTraceCtx = this.traceService.getActiveContext()
void activeTraceCtx

Expand Down Expand Up @@ -202,10 +196,7 @@ export class DbHookTrx<SourceName extends string = string> {
// #region beforeRollback

@TraceLog<DbHookTrx['beforeRollbackHook']>({
after([options], _res, decoratorContext) {
if (! decoratorContext.traceScope) {
decoratorContext.traceScope = this.getTraceScopeByTrx(options.trx)
}
after([options]) {
const { kmore, trx } = options
const events = genCommonAttr(KmoreAttrNames.TrxRollbackStart, {
dbId: kmore.dbId,
Expand Down

0 comments on commit 42b7cfd

Please # to comment.