Class: PactBroker::DB::CleanIncremental
- Inherits:
-
Object
- Object
- PactBroker::DB::CleanIncremental
- Defined in:
- lib/pact_broker/db/clean_incremental.rb
Constant Summary collapse
- DEFAULT_KEEP_SELECTORS =
[ PactBroker::DB::Clean::Selector.new(tag: true, latest: true), PactBroker::DB::Clean::Selector.new(branch: true, latest: true), PactBroker::DB::Clean::Selector.new(latest: true), PactBroker::DB::Clean::Selector.new(deployed: true), PactBroker::DB::Clean::Selector.new(released: true), PactBroker::DB::Clean::Selector.new(max_age: 90) ]
- TABLES =
[:versions, :pact_publications, :pact_versions, :verifications, :triggered_webhooks, :webhook_executions]
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(database_connection, options = {}) ⇒ CleanIncremental
constructor
A new instance of CleanIncremental.
Constructor Details
#initialize(database_connection, options = {}) ⇒ CleanIncremental
Returns a new instance of CleanIncremental.
23 24 25 26 |
# File 'lib/pact_broker/db/clean_incremental.rb', line 23 def initialize database_connection, = {} @db = database_connection @options = end |
Class Method Details
.call(database_connection, options = {}) ⇒ Object
19 20 21 |
# File 'lib/pact_broker/db/clean_incremental.rb', line 19 def self.call database_connection, = {} new(database_connection, ).call end |
Instance Method Details
#call ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'lib/pact_broker/db/clean_incremental.rb', line 28 def call require "pact_broker/db/models" if dry_run? dry_run_results else execute_clean end end |