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) ]
- DEFAULT_KEEP_BRANCH_SELECTORS =
[ PactBroker::DB::Clean::BranchSelector.new(max_age: 90) ]
- TABLES =
[:versions, :pact_publications, :pact_versions, :verifications, :triggered_webhooks, :webhook_executions, :branches]
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.
27 28 29 30 |
# File 'lib/pact_broker/db/clean_incremental.rb', line 27 def initialize database_connection, = {} @db = database_connection @options = end |
Class Method Details
.call(database_connection, options = {}) ⇒ Object
23 24 25 |
# File 'lib/pact_broker/db/clean_incremental.rb', line 23 def self.call database_connection, = {} new(database_connection, ).call end |
Instance Method Details
#call ⇒ Object
32 33 34 35 36 37 38 39 40 |
# File 'lib/pact_broker/db/clean_incremental.rb', line 32 def call require "pact_broker/db/models" if dry_run? dry_run_results else execute_clean end end |