From baeafec74ab02f5b19553f03992b4bb52c0b0eba Mon Sep 17 00:00:00 2001 From: Jonathan Gold Date: Wed, 8 Nov 2017 15:21:54 -0500 Subject: [PATCH] resources: aws: ec2: Move Watch to longpollWatch --- resources/aws_ec2.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/aws_ec2.go b/resources/aws_ec2.go index 2639bd86..9110493b 100644 --- a/resources/aws_ec2.go +++ b/resources/aws_ec2.go @@ -156,6 +156,11 @@ func (obj *AwsEc2Res) Init() error { // Watch is the primary listener for this resource and it outputs events. func (obj *AwsEc2Res) Watch() error { + return obj.longpollWatch() +} + +// longpollWatch uses the ec2 api's built in methods to watch ec2 resource state. +func (obj *AwsEc2Res) longpollWatch() error { send := false var exit *error if err := obj.Running(); err != nil {