File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -660,20 +660,17 @@ async def _energy_log_records_load_from_cache(self) -> bool:
660660
661661 # Iterate in reverse sorted order directly
662662 for address in sorted (collected_logs , reverse = True ):
663- slots = collected_logs [address ]
664- filtered_slots = {
665- slot : data
666- for slot , data in sorted (slots .items (), reverse = True )
667- if data [0 ] > skip_before
668- }
669- for slot , (timestamp , pulses ) in filtered_slots .items ():
663+ for slot in range (4 ,0 ,- 1 ):
664+ (timestamp , pulses ) = collected_logs [address ][slot ]
665+ if timestamp > skip_before :
666+ continue
670667 self ._energy_counters .add_pulse_log (
671668 address = address ,
672669 slot = slot ,
673670 pulses = pulses ,
674671 timestamp = timestamp ,
675672 import_only = True ,
676- )
673+ )
677674
678675 self ._energy_counters .update ()
679676
You can’t perform that action at this time.
0 commit comments