Skip to content

Commit

Permalink
Remove status package and move start_time into Sensor.
Browse files Browse the repository at this point in the history
  • Loading branch information
dboulware committed Jan 17, 2024
1 parent 8a4f69e commit e35274f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 1 addition & 2 deletions scos_actions/actions/acquire_sea_data_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
create_statistical_detector,
)
from scos_actions.signals import measurement_action_completed, trigger_api_restart
from scos_actions.status import start_time
from scos_actions.utils import convert_datetime_to_millisecond_iso_format, get_days_up

from scos_actions import __version__ as SCOS_ACTIONS_VERSION
Expand Down Expand Up @@ -762,7 +761,7 @@ def capture_diagnostics(
logger.warning("Failed to get CPU overheating status")
try: # SCOS start time
cpu_diag["software_start"] = convert_datetime_to_millisecond_iso_format(
start_time
self.sensor.start_time
)
except:
logger.warning("Failed to get SCOS start time")
Expand Down
6 changes: 6 additions & 0 deletions scos_actions/hardware/sensor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import hashlib
import json
from datetime import datetime
from typing import Dict

from its_preselector.preselector import Preselector
Expand Down Expand Up @@ -27,6 +28,7 @@ def __init__(
self._switches = switches
self._location = location
self.capabilities = capabilities
self.start_time = datetime.datetime.utcnow()

@property
def signal_analyzer(self) -> SignalAnalyzerInterface:
Expand Down Expand Up @@ -98,3 +100,7 @@ def has_configurable_preselector(self) -> bool:
return True
else:
return False

@property
def start_time(self):
return self.start_time
3 changes: 0 additions & 3 deletions scos_actions/status/__init__.py

This file was deleted.

0 comments on commit e35274f

Please sign in to comment.