Changeset 35088
- Timestamp:
- Feb 6, 2013, 11:07:50 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20121219/ippToPsps/jython/ipptopsps.py
r35076 r35088 45 45 # argv[1] -> self.skychunk.name 46 46 self.skychunk = Skychunk(self.logger) 47 print "here... "48 47 49 48 # create connection to databases database … … 54 53 raise 55 54 56 print "here... "57 58 55 self.checkClientStatus() 59 print "here... "60 56 61 57 # catch Ctrl-C signal 62 58 signal.signal(signal.SIGINT, self.signal_handler) 63 print "here... "64 59 65 60 # title for log … … 69 64 self.logger.infoPair("PID", "%d" % self.PID) 70 65 self.logger.infoPair("Skychunk", self.skychunk.name) 71 print "here... "72 66 73 67 ''' … … 118 112 def refreshSkychunk(self): 119 113 120 print "refresh... "121 print "self.skychunk.createNewSkychunk: ", self.skychunk.createNewSkychunk122 123 114 # new skychunk? 124 115 if self.skychunk.createNewSkychunk: 125 print "self.skychunk.createNewSkychunk: ", self.skychunk.createNewSkychunk126 116 self.ippToPspsDb.editSkychunk() 127 print "self.skychunk.createNewSkychunk: ", self.skychunk.createNewSkychunk128 117 self.ippToPspsDb.setSkychunkForThisClient(self.skychunk.name, self.HOST, self.PID) 129 print "self.skychunk.createNewSkychunk: ", self.skychunk.createNewSkychunk130 118 self.skychunk.createNewSkychunk = False 131 119 132 print "refresh... "133 120 # if we are rotating skychunks, then look for next active one in list 134 121 if self.skychunk.rotateSkychunks: … … 146 133 self.ippToPspsDb.setSkychunkForThisClient(newSkychunk, self.HOST, self.PID) 147 134 148 print "refresh... "149 135 return self.ippToPspsDb.readSkychunk(self.HOST, self.PID) 150 136 … … 154 140 def checkClientStatus(self): 155 141 156 print "stat... "157 142 self.ippToPspsDb.updateClient(self.config.programName, self.HOST, self.PID) 158 143 159 print "stat... "160 144 if self.ippToPspsDb.isKilled(self.HOST, self.PID): 161 145 self.exitProgram("killed via Db") … … 163 147 # this loop pauses the process if we have no skychunk or we have set it to pause 164 148 firstTimeIn = True 165 print "stat... "166 149 while not self.refreshSkychunk() or self.ippToPspsDb.isPaused(self.HOST, self.PID): 167 150 168 print "stat... "169 151 self.ippToPspsDb.updateClient(self.config.programName, self.HOST, self.PID) 170 152 if self.ippToPspsDb.isKilled(self.HOST, self.PID): … … 173 155 firstTimeIn = False 174 156 time.sleep(self.PAUSEPERIOD) 175 176 print "stat done... "177 157 178 158
Note:
See TracChangeset
for help on using the changeset viewer.
