lib/dirty_pipeline/pg/railway.rb in dirty_pipeline-0.8.2 vs lib/dirty_pipeline/pg/railway.rb in dirty_pipeline-0.8.3
- old
+ new
@@ -79,13 +79,13 @@
def switch_to(name)
raise ArgumentError unless DEFAULT_OPERATIONS.include?(name.to_s)
return if name.to_s == active
with_postgres do |c|
- c.exec('START TRANSACTION;')
+ # c.exec('START TRANSACTION;')
c.exec(SWITCH_OPERATION, [active_operation_key, name])
- c.exec('COMMIT;')
+ # c.exec('COMMIT;')
end
end
SELECT_OPERATION = <<~SQL
SELECT name FROM dp_active_operations WHERE key = $1;
@@ -131,12 +131,12 @@
DO UPDATE SET name = EXCLUDED.name;
SQL
def start_transaction!
switch_to(DEFAULT_OPERATIONS.first) unless active
with_postgres do |c|
- c.exec('START TRANSACTION;')
+ # c.exec('START TRANSACTION;')
c.exec(SWITCH_TRANSACTION, [active_transaction_key, @tx_id])
- c.exec('COMMIT;')
+ # c.exec('COMMIT;')
end
end
def finish_transaction!
clear! if running_transaction == @tx_id