Changeset 783
- Timestamp:
- 03/31/13 21:35:31 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.4/jobarchived/jobarchived.py
r782 r783 889 889 """When all metrics have gone, check if any jobs have finished""" 890 890 891 jobs_finished = [ ] 892 891 893 debug_msg( 1, "XML: Processed "+str(self.elementct)+ " elements - found "+str(len(self.jobs_processed))+" jobs" ) 892 894 … … 908 910 909 911 elif jobid not in self.jobs_processed: 912 910 913 # Was running previous heartbeat but not anymore: must be finished 911 914 self.jobAttrs[ jobid ]['status'] = 'F' … … 913 916 debug_msg( 1, 'job %s appears to have finished' %jobid ) 914 917 918 jobs_finished.append( jobid ) 919 915 920 if not jobid in self.jobs_to_store: 916 921 self.jobs_to_store.append( jobid ) … … 919 924 920 925 elif self.jobAttrsSaved.has_key( jobid ): 926 927 # This should pretty much never happen, but hey let's be careful 928 # Perhaps if someone altered their job while in queue with qalter 921 929 922 930 if self.jobinfoChanged( jobid, jobinfo ): … … 949 957 self.ds.storeJobInfo( jobid, self.jobAttrs[ jobid ] ) 950 958 951 self.jobAttrsSaved[ jobid ] = self.jobAttrs[ jobid ] 959 if not jobid in jobs_finished: 960 961 self.jobAttrsSaved[ jobid ] = self.jobAttrs[ jobid ] 962 963 elif self.jobAttrsSaved.has_key( jobid ): 964 965 del self.jobAttrsSaved[ jobid ] 952 966 953 967 if self.jobAttrs[ jobid ]['status'] == 'F': … … 961 975 962 976 self.jobs_processed = [ ] 977 978 # TODO: once in while check database AND self.jobAttrsSaved for stale jobs 963 979 964 980 def setJobAttrs( self, old, new ):
Note: See TracChangeset
for help on using the changeset viewer.