Changeset 704 for branches/0.4/jobmond/jobmond.py
- Timestamp:
- 03/21/13 17:05:42 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.4/jobmond/jobmond.py
r703 r704 58 58 LONG_L = [ 'help', 'config=', 'pidfile=', 'version' ] 59 59 60 global PIDFILE JOBMOND_CONF60 global PIDFILE, JOBMOND_CONF 61 61 PIDFILE = None 62 62 … … 1250 1250 except: 1251 1251 parse_err = 1 1252 if piping.wait(): 1253 debug_msg(10, 1254 "qstat error, skipping until next polling interval: " 1255 + piping.childerr.readline()) 1252 if piping.wait(): 1253 debug_msg(10, "qstat error, skipping until next polling interval: " + piping.childerr.readline()) 1256 1254 return None 1257 1255 elif parse_err: … … 1273 1271 # PBS-type PPN isn't something you use 1274 1272 # with SGE. 1275 job["ppn"] = float(job["slots"]) / \ 1276 len(job["nodes"]) 1273 job["ppn"] = float(job["slots"]) / len(job["nodes"]) 1277 1274 except: 1278 1275 job["ppn"] = 0 … … 1282 1279 # the SGE server's time is later 1283 1280 # than our local time. 1284 start_timestamp = \ 1285 int (job["start_timestamp"]) 1286 if start_timestamp > \ 1287 int(self.cur_time) + \ 1288 int(self.timeoffset): 1289 1290 self.timeoffset = \ 1291 start_timestamp - \ 1292 int(self.cur_time) 1281 start_timestamp = int (job["start_timestamp"]) 1282 if start_timestamp > int(self.cur_time) + int(self.timeoffset): 1283 1284 self.timeoffset = start_timestamp - int(self.cur_time) 1293 1285 else: 1294 1286 # fixme: Note sure what this should be: … … 1303 1295 myAttrs[attr] = str(job[attr]) 1304 1296 myAttrs["nodes"] = job["nodes"] 1305 myAttrs["reported"] = str(int(self.cur_time) + \ 1306 int(self.timeoffset)) 1297 myAttrs["reported"] = str(int(self.cur_time) + int(self.timeoffset)) 1307 1298 myAttrs["domain"] = fqdn_parts(socket.getfqdn())[1] 1308 1299 myAttrs["poll_interval"] = str(BATCH_POLL_INTERVAL) 1309 1300 1310 if self.jobDataChanged(self.jobs, job_id, myAttrs) \ 1311 and myAttrs["status"] in ["R", "Q"]: 1301 if self.jobDataChanged(self.jobs, job_id, myAttrs) and myAttrs["status"] in ["R", "Q"]: 1312 1302 self.jobs[job_id] = myAttrs 1313 1303 for id, attrs in self.jobs.items():
Note: See TracChangeset
for help on using the changeset viewer.