AsyncJobs can be used to poll the Nucleus backend for the status and errors of a long-running job.
You can also check on your async jobs in the dashboard: https://dashboard.scale.com/nucleus/jobs.
Retrieving an AsyncJob
Many operations in Nucleus return an AsyncJob. For example, Dataset.append always runs asynchronously and returns an AsyncJob; other operations such as Dataset.annotate return one when you set asynchronous=True.
job to poll for status and errors via the Nucleus API.
If you already invoked a job but no longer have its associated AsyncJob object, you can retrieve it by job_id (guaranteed to be unique) with NucleusClient.get_job():
job to poll for status and errors.
Check Status
You can pollAsyncJobs for their status at any time (status()).
Check Errors
You can list the 10,000 most recent errors of anAsyncJob at any time (errors()). This is useful for debugging larger payloads containing multiple items, annotations, etc.
Sleep Until Completion
You can useAsyncJobs to block further processing until it completes or errors (sleep_until_complete()). This is useful to create dependencies, e.g. block a Dataset.annotate operation on Dataset.append. Note we are actively developing more intelligent blocking logic to alleviate such issues.