Skip to content

Could Compute operation emit 'running' event? #1109

Closed

Description

@tnptop

It seems that the operation object can only emit 'complete' and 'error' events. I think it would be great if the object could also emit 'running' or similar event that indicate the 'RUNNING' status in all Operation resources.
A use case example for that feature is to show users that the instance is in the process of creation. It can be done manually by the method similar toOperation.prototype.startPolling_ but since there already is the function for that job, it should not be re-implemented.

Activity

  1. stephenplusplus commented on Feb 4, 2016

    @stephenplusplus
    Contributor

    How about progress events?

    operation.on('progress', function(progress, metadata) {
      // progress = 80;
    
      // metadata = {
      //   kind: 'compute#operation',
      //   id: '...',
      //   status: 'RUNNING',
      //   progress: 80,
      //   ...
      // };
    });
  2. tnptop commented on Feb 4, 2016

    @tnptop
    Author

    It sounds great! It will be much easier to implement progress tracking feature with 'progress' event.
    Thank you for your fast response.

  3. self-assigned this
    on Feb 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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