Project

General

Profile

Download (592 Bytes) Statistics
| Branch: | Tag: | Revision:

foreman_pipeline / app / lib / actions / foreman_pipeline / jenkins / wait_and_poll.rb @ be52ca64

1
module Actions
2
  module ForemanPipeline
3
    module Jenkins
4
      class WaitAndPoll < AbstractJenkinsAction
5
        include Dynflow::Action::Polling
6
        include Dynflow::Action::Cancellable
7
        
8
        def external_task
9
          output[:result]
10
        end
11

    
12
        def done?
13
          external_task
14
        end
15

    
16
        private
17

    
18
        def invoke_external_task
19
          nil
20
        end
21

    
22
        def external_task=(external_task_data)
23
          output[:result] = external_task_data
24
        end
25

    
26
        def poll_interval
27
          5
28
        end
29
        
30
      end
31
    end
32
  end
33
end