Module: Sidekiq::TransactionGuard::DatabaseCleaner
- Defined in:
- lib/sidekiq/transaction_guard/database_cleaner.rb
Instance Method Summary collapse
-
#cleaning { ... } ⇒ Object
Wrap the ‘Sidekiq::TransactionGuard.testing` method which sets up the data structures needed for custom counting of the transaction level within a test block.
-
#start ⇒ Object
Override the start method to set the base number of allowed transactions to the current level.
Instance Method Details
#cleaning { ... } ⇒ Object
Wrap the ‘Sidekiq::TransactionGuard.testing` method which sets up the data structures needed for custom counting of the transaction level within a test block.
25 26 27 |
# File 'lib/sidekiq/transaction_guard/database_cleaner.rb', line 25 def cleaning(&block) Sidekiq::TransactionGuard.testing { super(&block) } end |
#start ⇒ Object
Override the start method to set the base number of allowed transactions to the current level. Anything above this number will then be considered to be in a transaction.
14 15 16 17 18 |
# File 'lib/sidekiq/transaction_guard/database_cleaner.rb', line 14 def start retval = super Sidekiq::TransactionGuard.set_allowed_transaction_level(connection_class) retval end |