Skip to content

feat(break): use async local storage#69

Merged
killagu merged 1 commit intomasterfrom
feat/async_local_storage
Dec 22, 2022
Merged

feat(break): use async local storage#69
killagu merged 1 commit intomasterfrom
feat/async_local_storage

Conversation

@killagu
Copy link
Contributor

@killagu killagu commented Dec 21, 2022

Checklist
  • npm test passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)
Description of change

// should wait all handlers done then destroy ctx
e.message = `[EventBus] process event ${String(event)} failed: ${e.message}`;
this.logger.error(e);
await ContextHandler.run(ctx, async () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个思路确实没想过。。。

@codecov
Copy link

codecov bot commented Dec 21, 2022

Codecov Report

Base: 92.23% // Head: 91.71% // Decreases project coverage by -0.52% ⚠️

Coverage data is based on head (ff81b42) compared to base (efc615e).
Patch coverage: 91.93% of modified lines in pull request are covered.

❗ Current head ff81b42 differs from pull request most recent head 15fadf2. Consider uploading reports for the commit 15fadf2 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #69      +/-   ##
==========================================
- Coverage   92.23%   91.71%   -0.53%     
==========================================
  Files         217      222       +5     
  Lines        4368     4512     +144     
  Branches      447      460      +13     
==========================================
+ Hits         4029     4138     +109     
- Misses        338      374      +36     
+ Partials        1        0       -1     
Impacted Files Coverage Δ
...ore/runtime/src/factory/LoadUnitInstanceFactory.ts 94.28% <ø> (ø)
core/runtime/src/model/LoadUnitInstance.ts 100.00% <ø> (ø)
plugin/eventbus/lib/EggEventContext.ts 100.00% <ø> (ø)
plugin/tegg/app/extend/application.unittest.ts 65.00% <40.90%> (-30.46%) ⬇️
core/eventbus-runtime/src/SingletonEventBus.ts 85.22% <78.94%> (+0.34%) ⬆️
plugin/orm/lib/ContextModeObject.ts 74.19% <85.71%> (-1.57%) ⬇️
core/runtime/src/impl/ContextInitiator.ts 96.15% <96.15%> (ø)
core/runtime/src/impl/ContextObjectGraph.ts 96.29% <96.29%> (ø)
...ler-decorator/src/decorator/http/HTTPController.ts 100.00% <100.00%> (ø)
...ic-inject-runtime/src/EggObjectFactoryPrototype.ts 100.00% <100.00%> (ø)
... and 37 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@killagu killagu force-pushed the feat/async_local_storage branch from ff81b42 to 15fadf2 Compare December 21, 2022 14:32
@killagu killagu changed the title WIP: feat(break): use async local storage feat(break): use async local storage Dec 21, 2022
@killagu killagu merged commit 772aeb9 into master Dec 22, 2022
@killagu killagu deleted the feat/async_local_storage branch December 22, 2022 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants