[Ovirt-devel] [PATCH server] Also print reconnect message in log.
Jason Guiditta
jason.guiditta at gmail.com
Fri May 29 22:18:07 UTC 2009
Good timing, I'll test this monday
On Fri, May 29, 2009 at 6:14 PM, Ian Main <imain at redhat.com> wrote:
> It seems people were getting confused by the message that taskomatic was
> disconnected and not logging a reconnect message. This patch makes it
> log on reconnect as well.
>
> Signed-off-by: Ian Main <imain at redhat.com>
> ---
> src/task-omatic/taskomatic.rb | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/src/task-omatic/taskomatic.rb b/src/task-omatic/taskomatic.rb
> index 71432d2..1b4d83b 100755
> --- a/src/task-omatic/taskomatic.rb
> +++ b/src/task-omatic/taskomatic.rb
> @@ -842,14 +842,19 @@ class TaskOmatic
> end
>
> def mainloop()
> + was_disconnected = false
> loop do
>
> if not @broker.connected?
> - @logger.error("Cannot implement tasks, not connected to broker.
> Sleeping.")
> + @logger.info("Cannot implement tasks, not connected to broker.
> Sleeping.")
> sleep(@sleeptime * 3)
> + was_disconnected = true
> next
> end
>
> + @logger.info("Reconnected, resuming task checking..") if
> was_disconnected
> + was_disconnected = false
> +
> 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/00f6772e/attachment.htm>
More information about the ovirt-devel
mailing list