Sha256: 9fb67289ca020187c8dc34106895f4e076d9e6f5bb2307861c5f07d069f9d8df

Contents?: true

Size: 665 Bytes

Versions: 2

Compression:

Stored size: 665 Bytes

Contents

# frozen_string_literal: true

module Dynflow
  module DelayedExecutors
    class Polling < Abstract
      def core_class
        Dynflow::DelayedExecutors::PollingCore
      end
    end

    class PollingCore < AbstractCore
      attr_reader :poll_interval

      def configure(options)
        super(options)
        @poll_interval = options[:poll_interval]
      end

      def start
        check_delayed_plans
      end

      def check_delayed_plans
        check_time = time
        plans = delayed_execution_plans(check_time)
        process plans, check_time

        world.clock.ping(self, poll_interval, :check_delayed_plans)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dynflow-1.9.0 lib/dynflow/delayed_executors/polling.rb
dynflow-1.8.3 lib/dynflow/delayed_executors/polling.rb