Skip to content

Commit

Permalink
More logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
LoganBarnett committed Aug 24, 2009
1 parent 0592644 commit 3ee93a2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/fails/fails_controller.rb
Expand Up @@ -9,6 +9,7 @@ def load
while true
sleep 5
begin
puts "polling"
model.poll_fails
on_edt { update_view }
rescue => e
Expand Down
11 changes: 11 additions & 0 deletions src/fails/fails_model.rb
Expand Up @@ -11,4 +11,15 @@ def poll_fails
end
@fails.flatten!
end

# uncomment to test without a connection or see variations
# def poll_fails
# sleep(rand(10) + 1)
# if @empty
# @fails = []
# else
# @fails = %w{foo bar bazz}
# end
# @empty = !@empty
# end
end
1 change: 1 addition & 0 deletions src/fails/fails_view.rb
Expand Up @@ -37,5 +37,6 @@ def display_fails(model, transfer)
end
end
@main_view_component.content_pane.revalidate
@main_view_component.content_pane.repaint
end
end

0 comments on commit 3ee93a2

Please sign in to comment.