Skip to content

Commit

Permalink
fix: update metrics_to_store to use field default_factory for proper …
Browse files Browse the repository at this point in the history
…initialization
  • Loading branch information
furkan-bilgin committed Dec 27, 2024
1 parent bc49af1 commit e6ba716
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/enrgdaq/daq/jobs/pc_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from enum import Enum

import psutil
from msgspec import field

from enrgdaq.daq.base import DAQJob
from enrgdaq.daq.models import DAQJobMessage
Expand All @@ -26,7 +27,7 @@ class DAQJobPCMetricsConfig(StorableDAQJobConfig):
poll_interval_seconds (int): Polling interval in seconds. If not specified, the default polling interval will be used.
"""

metrics_to_store: list[PCMetric] = list(PCMetric.__members__.keys())
metrics_to_store: list[PCMetric] = field(default_factory=lambda: list(PCMetric))
poll_interval_seconds: int = DAQ_JOB_PC_METRICS_QUERY_INTERVAL_SECONDS


Expand Down

0 comments on commit e6ba716

Please sign in to comment.