Duplicate Actions::Candlepin::ListenOnCandlepinEvents tasks
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1243959
In certain situations the user can end up with large lists of this task running or stuck in paused:pending state and can't be mass resumed.
See attached screenshot.
We need to ensure there is only one of these tasks running at a time and we don't spam the tasks list with multiple tasks that can't be mass resumed.
fixes #11166 - better handling qpid disconnections on cp listener
- converts the sleep statement to use the world clock to ping
- exits the listener thread in CandlepinListeningService instead of
looping every 1 second until the connection is reestablished
- reduces the number of at_exit blocks to 1