-
-
Save indygwyn/c57463a7947601e3b4e034fd38fd2a78 to your computer and use it in GitHub Desktop.
pulp-admin.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| STATE="" | |
| for TASK in `pulp-admin tasks list | egrep '^Task Id:|^State:' | sed -e 's,^Task Id: ,,' -e 's,^State: ,,'`; do | |
| if [ "$STATE" = "" ]; then | |
| STATE=$TASK | |
| else | |
| if [ $STATE != Successful ] && [ $STATE != Cancelled ] && [ $STATE != Failed ]; then | |
| pulp-admin tasks details --task-id=$TASK | |
| pulp-admin tasks cancel --task-id=$TASK | |
| fi | |
| STATE="" | |
| fi | |
| done | |
| ================== | |
| # foreman-rake console | |
| ForemanTasks::Task.where(:state => :running).where(:label => "Actions::Katello::Host::GenerateApplicability").destroy_all | |
| ForemanTasks::Task.where(:state => :paused).where(:label => "Actions::Katello::Host::GenerateApplicability").destroy_all | |
| ForemanTasks::Task.where(:state => :paused).where(:label => "Actions::Katello::Repository::Sync").destroy_all | |
| ForemanTasks::Task.where(:state => :running).where(:label => "Actions::Katello::Repository::Sync").destroy_all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment