Sha256: 4decdccbb75b8c9e3a2cbc8fcee7ab444a1307ea2177c586a0f2e52059bd4f04
Contents?: true
Size: 920 Bytes
Versions: 53
Compression:
Stored size: 920 Bytes
Contents
module Actions module Helpers module Lock # @see Lock.exclusive! def exclusive_lock!(resource) phase! Dynflow::Action::Plan parent_lock = ::ForemanTasks::Lock.for_resource(resource).where(:task_id => task.self_and_parents.map(&:id)).first if parent_lock ForemanTasks::Link.link_resource_and_related!(resource, task) parent_lock else ::ForemanTasks::Lock.exclusive!(resource, task) end end # @see Lock.lock! def lock!(resource, *_lock_names) Foreman::Deprecation.deprecation_warning('2.4', 'locking in foreman-tasks was reworked, please use a combination of exclusive_lock! and link! instead.') exclusive_lock!(resource) end # @see Lock.link! def link!(resource) phase! Dynflow::Action::Plan ::ForemanTasks::Link.link!(resource, task) end end end end
Version data entries
53 entries across 53 versions & 1 rubygems