Skip to content

Commit

Permalink
Merge pull request xrmx#30 from akash0x53/master
Browse files Browse the repository at this point in the history
Don't show "False" last spawn time if it's 0.
  • Loading branch information
unbit committed Apr 19, 2015
2 parents 1596dd2 + 56015bf commit 837263a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion uwsgitop
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,16 @@ while True:
for worker in dd['workers']:
sigs = 0
wtx = human_size(worker['tx'])
wlastspawn = "--:--:--"

wrunt = worker['running_time']/1000
if wrunt > 9999999:
wrunt = "%sm" % str(wrunt / (1000*60))
else:
wrunt = str(wrunt)

wlastspawn = time.strftime("%H:%M:%S", time.localtime(worker['last_spawn']))
if worker['last_spawn']:
wlastspawn = time.strftime("%H:%M:%S", time.localtime(worker['last_spawn']))

color = curses.color_pair(0)
if 'signals' in worker:
Expand Down

0 comments on commit 837263a

Please sign in to comment.