1

This is maybe very simple question but I could not find the documentation for this function : "ee.data.getTaskStatus" . I could only get the "ee.data.getTaskStatus" documentation page. My question is, what exactly each parameter in the dictionary means? I can assume but I would like to be sure about it:

ee.data.getTaskStatus("ABCDEFGHIJKLMNOP26QRSTUB")

[{'state': 'COMPLETED',
  'description': 'task',
  'creation_timestamp_ms': 1695901638238,
  'update_timestamp_ms': 1695901780869,
  'start_timestamp_ms': 1695901650193,
  'task_type': 'EXPORT_IMAGE',
  'destination_uris': ['https://console.developers.google.com/storage/browser/my_secret_bucket/path/to/secrets'],
  'attempt': 1,
  'batch_eecu_usage_seconds': 234.16341019503,
  'id': 'ABCDEFGHIJKLMNOP26QRSTUB',
  'name': 'projects/earthengine-legacy/operations/ABCDEFGHIJKLMNOP26QRSTUB'}]

I want mainly to understand the timestamp keys. My end goal is to be able to understand how long did it take for the task to run, since it started until it was uploaded.

1 Answer 1

2

The information you are looking for is here:

https://developers.google.com/earth-engine/apidocs/ee-data-getoperation

+ state: PENDING, RUNNING, CANCELLING, SUCCEEDED, CANCELLED, or FAILED

+ description: Supplied task description

+ type: EXPORT_IMAGE, EXPORT_FEATURES, etc.

+ create_time: Time the operation was first submitted.

+ update_time: Timestamp of most recent update.

+ start_time: Time the operation started, when so.

+ end_time: Time the operation finished running, when so.

+ attempt: Number of retries of this task, starting at 1.

+ destination_uris: Resources output by this operation.

+ batch_eecu_usage_seconds: CPU used by this operation.

However, there seems to be some small differences in the structure of the response, e.g. creation_timestamp_ms instead of create_time, which is returned in human-readable format. Also, the way you use ee.data.getOperation is with the standard "long running operations" name, i.e. projects/project-name/operations/taskid where taskid is the id that you used for ee.data.getTaskStatus.

I think the ee.data.getOperation is the recommended one to use now instead of ee.data.getTaskStatus (which is no longer listed in the API reference).

2
  • thank you for the answer! there is something I don't understand, what should be inside the function? adduming I have my task id as str, but seems like it expect other type (TypeError: Parameter "name" value "ABCDEFGHIJKLMNOP26QRSTUB" does not match the pattern "^projects/[^/]+/operations/.*$"
    – ReutKeller
    Sep 28 at 13:55
  • 1
    "projects/project-name/operations/ABCDEFGHIJKLMNOP26QRSTUB" Sep 29 at 8:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.