Sha256: f23d522051ab4458c3dd94946518801317a3949be5cd5d4c8244368acc262190
Contents?: true
Size: 631 Bytes
Versions: 20
Compression:
Stored size: 631 Bytes
Contents
module Dynflow module Executors class Parallel < Abstract class Worker < Actor def initialize(pool, transaction_adapter) @pool = Type! pool, Concurrent::Actor::Reference @transaction_adapter = Type! transaction_adapter, TransactionAdapters::Abstract end def on_message(work_item) work_item.execute rescue Errors::PersistenceError => e @pool.tell([:handle_persistence_error, e]) ensure @pool.tell([:worker_done, reference, work_item]) @transaction_adapter.cleanup end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems