Opened 7 years ago

Closed 7 years ago

#6 closed task (fixed)

use getOnlineStatus instead of getMantidStatus and getPilotStatus

Reported by: zhangjr Owned by:
Priority: major Milestone:
Version: Keywords:
Cc: Blocked By:
Blocking: Parent ID:
Parent Tickets: Estimated Number of Hours: 0.0
Add Hours to Ticket: 0 Billable?: yes
Total Hours: 0

Description

def getOnlineStatus(self, name):

if name=="pilot":

hbPath=self.pilotHeartBeat

else:

hbPath=self.mantidHeartBeat

try:

hb = self.redisServer.get(hbPath)
state = int(json.loads(hb)status?)
time = json.loads(hb)timestamp?[0:19]
pid = json.loads(hb)pid?

except:

state = 0
time = '---'
pid = '0'

webInfo[name]heartbeat? = time
webInfo[name]state? = self.MYstatusList[state]
webInfo[name]pid? = pid
if state == 1 or state == 3 or state == 4:

webInfo[name]level? = 'normal'

elif _state == 0:

webInfo[name]level? = 'warning'

elif _state == 6:

webInfo[name]level? = 'error'

else:

webInfo[name]level? = 'warning'

Subtickets

Child Tickets

Change History (1)

comment:1 Changed 7 years ago by zhangjr

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.