Skip to content

compute onComplete example should show "the right way" to attach handlers? #921

@jgeewax

Description

@jgeewax

On https://googlecloudplatform.github.io/gcloud-node/#/docs/v0.24.1/compute/operation?method=onComplete

operation.onComplete(function(err, metadata) {
  if (err.code === 'OPERATION_INCOMPLETE') {
    // The operation is not complete yet. You may want to register another
    // `onComplete` listener or queue for later.
  }

  if (!err) {
    // Operation complete!
  }
});

This example doesn't really show me how I'm supposed to continue attaching handlers (and I would actually need to redesign the flow of my code to make this work).

Can we update the example to show exactly what "the right way" to do this is?

Metadata

Metadata

Assignees

Labels

api: computeIssues related to the Compute Engine API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions