lib/dirty_pipeline/railway.rb in dirty_pipeline-0.6.4 vs lib/dirty_pipeline/railway.rb in dirty_pipeline-0.7.0

- old
+ new

@@ -51,10 +51,15 @@ def running_transaction DirtyPipeline.with_redis { |r| r.get(active_transaction_key) } end + def other_transaction_in_progress? + return false if running_transaction.nil? + running_transaction != @tx_id + end + private def create_queue(operation_name) Queue.new(operation_name, @subject_class, @subject_id, @tx_id) end @@ -72,13 +77,8 @@ DirtyPipeline.with_redis { |r| r.set(active_transaction_key, @tx_id) } end def finish_transaction! clear! if running_transaction == @tx_id - end - - def other_transaction_in_progress? - return false if running_transaction.nil? - running_transaction != @tx_id end end end