Skip to content

Commit

Permalink
fix jobName, state and status values #272
Browse files Browse the repository at this point in the history
POST https://etl-dev.terrascope.be/resources {'jobId': 'j-220b5d02390e412386c93508badb7074', 'jobName': None, 'executionId': 'application_1674538064532_9722', 'userId': 'jenkins', 'sourceId': 'TerraScope/MEP', 'orchestrator': 'openeo', 'jobStart': 1674682122903.0, 'jobFinish': 1674682639861.0, 'state': 'SUCCEEDED', 'status': 'finished', 'metrics': {'cpu': {'value': 2480, 'unit': 'cpu-seconds'}, 'memory': {'value': 4020798, 'unit': 'mb-seconds'}, 'time': {'value': 516958.0, 'unit': 'milliseconds'}, 'processing': {'value': 0.0, 'unit': 'shpu'}}} returned 400: {"status":400,"message":"Bad Request Exception","timestamp":"2023-01-25T21:38:55.734Z","path":"/resources"}
  • Loading branch information
bossie committed Jan 26, 2023
1 parent 9ec4bff commit f30e0bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions openeogeotrellis/job_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def update_statuses(self) -> None:
sentinelhub_batch_processing_units = (ZkJobRegistry.get_dependency_usage(job_info)
or Decimal("0.0"))

job_title = result_metadata.get("title")
job_title = job_info.get("title")

with EtlApi(ConfigParams().etl_api) as etl_api:
resource_costs_in_credits = etl_api.log_resource_usage(
Expand All @@ -195,8 +195,8 @@ def update_statuses(self) -> None:
user_id=user_id,
started_ms=float(start_time),
finished_ms=float(finish_time),
state=final_state,
status=new_status,
state=state,
status=final_state,
cpu_seconds=cpu_time_seconds,
mb_seconds=memory_time_megabyte_seconds,
duration_ms=float(finish_time) - float(start_time),
Expand Down

0 comments on commit f30e0bc

Please sign in to comment.