Update to v0.7.0 #30
@@ -332,10 +332,12 @@ class RecurringScheduleService:
|
|||||||
)
|
)
|
||||||
actions.append(start_action)
|
actions.append(start_action)
|
||||||
|
|
||||||
# Create STOP action
|
# Create STOP action (stop_cycle handles download when include_download is True)
|
||||||
stop_notes = json.dumps({
|
stop_notes = json.dumps({
|
||||||
"schedule_name": schedule.name,
|
"schedule_name": schedule.name,
|
||||||
"schedule_id": schedule.id,
|
"schedule_id": schedule.id,
|
||||||
|
"schedule_type": "weekly_calendar",
|
||||||
|
"include_download": schedule.include_download,
|
||||||
})
|
})
|
||||||
stop_action = ScheduledAction(
|
stop_action = ScheduledAction(
|
||||||
id=str(uuid.uuid4()),
|
id=str(uuid.uuid4()),
|
||||||
@@ -350,27 +352,6 @@ class RecurringScheduleService:
|
|||||||
)
|
)
|
||||||
actions.append(stop_action)
|
actions.append(stop_action)
|
||||||
|
|
||||||
# Create DOWNLOAD action if enabled (1 minute after stop)
|
|
||||||
if schedule.include_download:
|
|
||||||
download_time = end_utc + timedelta(minutes=1)
|
|
||||||
download_notes = json.dumps({
|
|
||||||
"schedule_name": schedule.name,
|
|
||||||
"schedule_id": schedule.id,
|
|
||||||
"schedule_type": "weekly_calendar",
|
|
||||||
})
|
|
||||||
download_action = ScheduledAction(
|
|
||||||
id=str(uuid.uuid4()),
|
|
||||||
project_id=schedule.project_id,
|
|
||||||
location_id=schedule.location_id,
|
|
||||||
unit_id=unit_id,
|
|
||||||
action_type="download",
|
|
||||||
device_type=schedule.device_type,
|
|
||||||
scheduled_time=download_time,
|
|
||||||
execution_status="pending",
|
|
||||||
notes=download_notes,
|
|
||||||
)
|
|
||||||
actions.append(download_action)
|
|
||||||
|
|
||||||
return actions
|
return actions
|
||||||
|
|
||||||
def _generate_interval_actions(
|
def _generate_interval_actions(
|
||||||
|
|||||||
@@ -659,7 +659,7 @@ class SLMMClient:
|
|||||||
|
|
||||||
# Format as Auto_XXXX folder name
|
# Format as Auto_XXXX folder name
|
||||||
folder_name = f"Auto_{index_number:04d}"
|
folder_name = f"Auto_{index_number:04d}"
|
||||||
remote_path = f"/NL43_DATA/{folder_name}"
|
remote_path = f"/NL-43/{folder_name}"
|
||||||
|
|
||||||
# Download the folder
|
# Download the folder
|
||||||
result = await self.download_folder(unit_id, remote_path)
|
result = await self.download_folder(unit_id, remote_path)
|
||||||
|
|||||||
Reference in New Issue
Block a user