Class: Rosette::Core::Commands::RequeueCommitCommand
- Inherits:
-
GitCommand
- Object
- Command
- GitCommand
- Rosette::Core::Commands::RequeueCommitCommand
- Includes:
- WithRef, WithRepoName
- Defined in:
- lib/rosette/core/commands/queuing/requeue_commit_command.rb
Overview
Sets the commit’s status to NOT_FOUND, then enqueues it for processing on Rosette’s configured queue. In other words, this command will re-process the commit, which should be an idempotent operation.
Instance Attribute Summary
Attributes included from WithRef
Attributes included from WithRepoName
Attributes inherited from Command
Instance Method Summary collapse
Methods included from WithRef
#commit_id, #set_commit_id, #set_ref
Methods included from WithRepoName
Methods inherited from GitCommand
Methods inherited from Command
#initialize, #messages, #valid?, validate, validators
Constructor Details
This class inherits a constructor from Rosette::Core::Commands::Command
Instance Method Details
#execute ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/rosette/core/commands/queuing/requeue_commit_command.rb', line 28 def execute commit_log = datastore.lookup_commit_log(repo_name, commit_id) datastore.add_or_update_commit_log( commit_log.repo_name, commit_log.commit_id, commit_log.commit_datetime, PhraseStatus::NOT_FOUND, commit_log.phrase_count, commit_log.branch_name ) EnqueueCommitCommand.new(configuration) .set_repo_name(repo_name) .set_commit_id(commit_id) .execute end |