Changeset 6857
- Timestamp:
- Feb 16, 2018, 3:05:45 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lliurex-analytics-server/trunk/fuentes/lliurex-analytics-server/usr/sbin/analyticsd
r6819 r6857 106 106 t=str(int(time.time())) 107 107 if DEBUG: 108 printea('on {} analyticsd({}) is alive, all good :-)'.format(t,who),'debug') 108 pass 109 # too much verbose 110 # printea('on {} analyticsd({}) is alive, all good :-)'.format(t,who),'debug') 109 111 else: 110 112 if who == 'main': … … 505 507 while (lapps['timestamp'] > self.mon.commited): 506 508 time.sleep(0.001) 507 if len(lapps['apps']) != 0 and len(lapps['clients']) != 0: 509 if len(lapps['clients']) != 0: 510 printea('Thread {} putting client'.format(self.t),'debug') 508 511 #IF FAIL, AFTER RETRIES THREAD DIES 509 512 if not self.put_client(client_list=lapps['clients'],mon=self.mon): 510 513 self.q.put(lapps,True) # USELESS 511 514 return False # USELESS 515 if len(lapps['apps']) != 0: 516 printea('Thread {} putting clientapps'.format(self.t),'debug') 512 517 if not (self.put_apps(apps=lapps['apps'],mon=self.mon)): 513 518 self.q.put(lapps,True) # USELESS … … 522 527 def process(self,*args,**kwargs): 523 528 keepalive(self.t) 524 # code only for main thread 525 printea("Running thread {}".format(self.t),'debug') 529 # warning too much verbose, printea("Running thread {}".format(self.t),'debug') 526 530 if self.t == 'main' and not self.mon.terminate: 527 531 ret=self.process_main_thread(*args,**kwargs) … … 552 556 if self.mon.paused: 553 557 printea("Paused by high load {}".format(self.t),'debug') 554 if self.empty: 555 printea("Empty queue {} sleeping by now".format(self.t),'debug') 558 # Too much verbose 559 #if self.empty: 560 # printea("Empty queue {} sleeping by now".format(self.t),'debug') 556 561 if self.empty: 557 562 self.empty = False … … 587 592 # printea("Worker ({}) detected server gone away !!!: {}".format(self.t,e)) 588 593 589 printea("Trying to recover connection ({}) ".format(self.t))594 printea("Trying to recover connection ({}), {}".format(self.t,e)) 590 595 if self.reconnect == 100: 591 596 printea("Worker ({}) says: lost connection to database, reconnection not possible, terminating all processes".format(self.t))
Note: See TracChangeset
for help on using the changeset viewer.