waitForJob

Back to index

Summary

Waits until the specified job reaches a given status or the timeout expires. This command is only supported with ec-perl.

jobId
UUIDrequired

The job to wait for. include::partial$job-id.adoc[]

timeout
Integeroptional

The number of seconds to wait before giving up on a request. The default is 60 seconds.

finalStatus
Stringoptional
The status to wait for. Must be either running or completed (the default is completed).

Usage

Perl

$cmdr->waitForJob( "test-jobId" # jobId # optionals );

ectool

ectool waitForJob \ "test-jobId" `# jobId` \ # optionals

Examples

Perl

Wait for a job until it has a status of completed. This call waits for 60 seconds, which is the default timeout:

$cmdr->waitForJob("4fa765dd-73f1-11e3-b67e-b0a420524153");

Wait for a job until it has a status of completed. This call waits for 30 seconds:

$cmdr->waitForJob("4fa765dd-73f1-11e3-b67e-b0a420524153", 30);

Wait for a job until it has a status of running. This call waits for 60 seconds, which is the default timeout:

$cmdr->waitForJob("4fa765dd-73f1-11e3-b67e-b0a420524153", undef, "running");

ectool

This API is not supported by ectool.