class Camunda::Poller
The poller will run as an infinite loop with long polling to fetch tasks, queue, and run them. Topic is the process definition key. Below will run the poller to fetch, lock, and queue a task for the example process definition with an id of CamundaWorkflow. @example
Camunda::Poller.fetch_and_queue %w[CamundaWorkflow]
Public Class Methods
fetch_and_execute(topics, lock_duration: nil, long_polling_duration: nil)
click to toggle source
@deprecated Please use {#fetch_and_queue} instead
# File lib/camunda/poller.rb, line 8 def self.fetch_and_execute(topics, lock_duration: nil, long_polling_duration: nil) warn "[DEPRECATION] `fetch_and_execute` is deprecated. Please use `fetch_and_queue` instead." fetch_and_queue(topics, lock_duration: lock_duration, long_polling_duration: long_polling_duration) end
fetch_and_queue(topics, lock_duration: nil, long_polling_duration: nil)
click to toggle source
@param topics [Array] process definition keys @param lock_duration [Integer] lock duration time, default time is set in Camunda::Workflow.configuration
@param long_polling_duration [Integer] long polling time, default is set to Camunda::Workflow.configuration
# File lib/camunda/poller.rb, line 16 def self.fetch_and_queue(topics, lock_duration: nil, long_polling_duration: nil) loop do Camunda::ExternalTask.fetch_and_queue(topics, lock_duration: lock_duration, long_polling_duration: long_polling_duration) end end