Remove AutoPublishCompositeView event in favor of a task #11600
+91
−123
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What are the changes introduced in this pull request?
Removes the AutoPublishCompositeView event with a task that emulates the same behavior of the event + event queue retry function. Is the design totally insane or is there something to this?
Considerations taken when implementing this change?
Maintain the intention of the event in that the task will continue trying to trigger the Publish task until it's not locked by another task.
What are the testing steps for this pull request?
Publish a CV:
ForemanTasks.async_task(Actions::Katello::ContentView::AutoPublish, Katello::ContentView.find(2), description: 'fake', triggered_by: 49)And while it's running:
ForemanTasks.async_task(Actions::Katello::ContentView::AutoPublish, Katello::ContentView.find(2), description: 'fake', triggered_by: 49)Of course, you need your own values for the CV and triggered by id (which is a CVV)
Summary by Sourcery
Replace the AutoPublish composite view event mechanism with a task-based workflow that triggers composite content view auto-publish via ForemanTasks.
New Features:
Bug Fixes:
Enhancements:
Tests:
Chores: