[Ovirt-devel] [PATCH server] Make taskomatic not do tasks if not connected to qpidd.

Jason Guiditta jason.guiditta at gmail.com
Fri May 29 22:13:34 UTC 2009


ACK, this works.  I thought it did not at first though, because the log
gives no idication when it _does_ find a connection.  That might be helpful
output, not sure if it would be overkill or not.

On Fri, May 29, 2009 at 3:40 PM, Ian Main <imain at redhat.com> wrote:

> This patch just checks the broker to see if it's connected before
> attempting to implement tasks.
>
> Signed-off-by: Ian Main <imain at redhat.com>
> ---
>  src/task-omatic/taskomatic.rb |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/src/task-omatic/taskomatic.rb b/src/task-omatic/taskomatic.rb
> index 5393c29..71432d2 100755
> --- a/src/task-omatic/taskomatic.rb
> +++ b/src/task-omatic/taskomatic.rb
> @@ -843,6 +843,13 @@ class TaskOmatic
>
>   def mainloop()
>     loop do
> +
> +      if not @broker.connected?
> +        @logger.error("Cannot implement tasks, not connected to broker.
>  Sleeping.")
> +        sleep(@sleeptime * 3)
> +        next
> +      end
> +
>       tasks = Array.new
>       begin
>         tasks = Task.find(:all, :conditions =>
> --
> 1.6.0.6
>
> _______________________________________________
> Ovirt-devel mailing list
> Ovirt-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/ovirt-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20090529/af42d085/attachment.htm>


More information about the ovirt-devel mailing list