Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,8 +33,8 @@ def get_time_remaining(last_start_timestamp, run_duration_seconds):
|
|
| 33 |
last_start_dt = parser.isoparse(last_start_timestamp)
|
| 34 |
end_run_dt = last_start_dt + timedelta(seconds=run_duration_seconds)
|
| 35 |
now_dt = datetime.now(tz=last_start_dt.tzinfo)
|
| 36 |
-
delta = (end_run_dt - now_dt).total_seconds()
|
| 37 |
-
return max(delta, 0
|
| 38 |
|
| 39 |
def get_server(credentials, instance_name):
|
| 40 |
service = googleapiclient.discovery.build('compute', 'v1', credentials=credentials)
|
|
|
|
| 33 |
last_start_dt = parser.isoparse(last_start_timestamp)
|
| 34 |
end_run_dt = last_start_dt + timedelta(seconds=run_duration_seconds)
|
| 35 |
now_dt = datetime.now(tz=last_start_dt.tzinfo)
|
| 36 |
+
delta = int((end_run_dt - now_dt).total_seconds())
|
| 37 |
+
return max(delta, 0)
|
| 38 |
|
| 39 |
def get_server(credentials, instance_name):
|
| 40 |
service = googleapiclient.discovery.build('compute', 'v1', credentials=credentials)
|