Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Cleaning up status tag behavior

  • Loading branch information...
commit 632e5c8e35c59959ce4884e2e503427aaf88c387 1 parent d1b4e04
Bjarni R. Einarsson authored
Showing with 11 additions and 12 deletions.
  1. +5 −5 doc/REMOTEUI.md
  2. +6 −7 pagekite/__init__.py
View
10 doc/REMOTEUI.md
@@ -23,9 +23,10 @@ PageKite will send messages looking like this:
status_msg: Kites are flying and all is well.
status_tag: flying
...
- notify: Flying localhost:5900 as raw://b.pagekite.me:5900/ (HTTP proxied)
- notify: Flying localhost:52422 as https://chatkite.pagekite.me/
- notify: - https://chatkite.pagekite.me/
+ be_status: status=1000 domain=foo.pagekite.me port= proto=http ...
+ be_path: url=http://foo.pagekite.me/ policy=default src=/path/to/file
+ ...
+ notify: Some random text message
These messages will continue to arrive every few seconds for the lifetime
of the program, updating the UI on the current state.
@@ -46,8 +47,7 @@ tags currently exist:
serving - An HTTP request is being handled
idle - Running as front-end, waiting for back-ends.
down - Running as back-end, waiting for a front-end.
- flying - Have front- and back-ends, may be waiting for more.
- active - Have all required front- and back-ends, woohoo!
+ flying - Flying some kites!
exiting - Shutting down
## Run-time control commands ##
View
13 pagekite/__init__.py
@@ -3355,8 +3355,6 @@ def _run(self):
self.pkite.ui.NotifyFlyingFE(proto, port, domain)
self.PingTunnels(time.time())
- if len(self.pkite.backends.keys()):
- self.pkite.ui.Status('flying')
for bid in self.pkite.backends:
be = self.pkite.backends[bid]
@@ -3398,7 +3396,12 @@ def _run(self):
) % (tunnel_count, tunnel_total))
elif problem:
self.pkite.ui.Status('flying', color=self.pkite.ui.YELLOW,
- message='DynDNS updates may be incomplete, will retry...')
+ message='DynDNS updates may be incomplete, will retry...')
+ else:
+ self.pkite.ui.Status('flying', color=self.pkite.ui.GREEN,
+ message='Kites are flying and all is well.')
+
+
for i in xrange(0, check_interval):
if self.keep_running:
@@ -5225,10 +5228,6 @@ def CreateTunnels(self, conns):
if not self.last_updates:
self.last_updates = last_updates
- if not failures:
- self.ui.Status('active', color=self.ui.GREEN,
- message='Kites are flying and all is well.')
-
return failures
def LogTo(self, filename, close_all=True, dont_close=[]):
Please sign in to comment.
Something went wrong with that request. Please try again.