Commit 364372d
committed
Avoid creating dangling
When using `setdefault()`, if an object already existed for that key,
a `MetricFetcher` will be created anyways, only to be discarded right
after it was created.
Signed-off-by: Leandro Lucarella <[email protected]>MetricFetchers1 parent abe74d7 commit 364372d
File tree
2 files changed
+7
-5
lines changed- src/frequenz/sdk/timeseries/formula_engine
2 files changed
+7
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
719 | 719 | | |
720 | 720 | | |
721 | 721 | | |
722 | | - | |
723 | | - | |
724 | | - | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
725 | 725 | | |
726 | 726 | | |
727 | 727 | | |
728 | 728 | | |
729 | | - | |
730 | | - | |
| 729 | + | |
| 730 | + | |
731 | 731 | | |
732 | 732 | | |
733 | 733 | | |
| |||
0 commit comments