Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Marinovsky committed Jul 11, 2024
1 parent 636699d commit f768854
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lean/components/util/live_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ def _get_last_portfolio(api_client: APIClient, project_id: str, project_name: Pa
cloud_last_time = utc.localize(datetime.min)
if project_id:
cloud_deployment = api_client.get("live/read", {"projectId": project_id})
container.logger.info(f'----- After cloud_deployment_list: {cloud_deployment}')
if cloud_deployment["success"]:
cloud_last_time = datetime.strptime(cloud_deployment["launched"], "%Y-%m-%d %H:%M:%S").astimezone(UTC)
if cloud_deployment["success"] and cloud_deployment["status"] != "Undefined":
cloud_last_time = datetime.strptime(cloud_deployment["stopped"], "%Y-%m-%d %H:%M:%S").astimezone(UTC)

local_last_time = utc.localize(datetime.min)
live_deployment_path = f"{project_name}/live"
Expand Down

0 comments on commit f768854

Please sign in to comment.