Skip to content
This repository
Browse code

Cleaning up status tag behavior

  • Loading branch information...
commit 632e5c8e35c59959ce4884e2e503427aaf88c387 1 parent d1b4e04
Bjarni R. Einarsson authored

Showing 2 changed files with 11 additions and 12 deletions. Show diff stats Hide diff stats

  1. +5 5 doc/REMOTEUI.md
  2. +6 7 pagekite/__init__.py
10 doc/REMOTEUI.md
Source Rendered
@@ -23,9 +23,10 @@ PageKite will send messages looking like this:
23 23 status_msg: Kites are flying and all is well.
24 24 status_tag: flying
25 25 ...
26   - notify: Flying localhost:5900 as raw://b.pagekite.me:5900/ (HTTP proxied)
27   - notify: Flying localhost:52422 as https://chatkite.pagekite.me/
28   - notify: - https://chatkite.pagekite.me/
  26 + be_status: status=1000 domain=foo.pagekite.me port= proto=http ...
  27 + be_path: url=http://foo.pagekite.me/ policy=default src=/path/to/file
  28 + ...
  29 + notify: Some random text message
29 30
30 31 These messages will continue to arrive every few seconds for the lifetime
31 32 of the program, updating the UI on the current state.
@@ -46,8 +47,7 @@ tags currently exist:
46 47 serving - An HTTP request is being handled
47 48 idle - Running as front-end, waiting for back-ends.
48 49 down - Running as back-end, waiting for a front-end.
49   - flying - Have front- and back-ends, may be waiting for more.
50   - active - Have all required front- and back-ends, woohoo!
  50 + flying - Flying some kites!
51 51 exiting - Shutting down
52 52
53 53 ## Run-time control commands ##
13 pagekite/__init__.py
@@ -3355,8 +3355,6 @@ def _run(self):
3355 3355 self.pkite.ui.NotifyFlyingFE(proto, port, domain)
3356 3356
3357 3357 self.PingTunnels(time.time())
3358   - if len(self.pkite.backends.keys()):
3359   - self.pkite.ui.Status('flying')
3360 3358
3361 3359 for bid in self.pkite.backends:
3362 3360 be = self.pkite.backends[bid]
@@ -3398,7 +3396,12 @@ def _run(self):
3398 3396 ) % (tunnel_count, tunnel_total))
3399 3397 elif problem:
3400 3398 self.pkite.ui.Status('flying', color=self.pkite.ui.YELLOW,
3401   - message='DynDNS updates may be incomplete, will retry...')
  3399 + message='DynDNS updates may be incomplete, will retry...')
  3400 + else:
  3401 + self.pkite.ui.Status('flying', color=self.pkite.ui.GREEN,
  3402 + message='Kites are flying and all is well.')
  3403 +
  3404 +
3402 3405
3403 3406 for i in xrange(0, check_interval):
3404 3407 if self.keep_running:
@@ -5225,10 +5228,6 @@ def CreateTunnels(self, conns):
5225 5228 if not self.last_updates:
5226 5229 self.last_updates = last_updates
5227 5230
5228   - if not failures:
5229   - self.ui.Status('active', color=self.ui.GREEN,
5230   - message='Kites are flying and all is well.')
5231   -
5232 5231 return failures
5233 5232
5234 5233 def LogTo(self, filename, close_all=True, dont_close=[]):

0 comments on commit 632e5c8

Please sign in to comment.
Something went wrong with that request. Please try again.