PEATSA/WebApp/Data.py
def calculationStates(self):
	
		'''Returns the state of the calculations.
		
		This is a dictionary of calculationName:JobState pairs.
		Valid States are 
			- NotSelected
			- Selected
			- Queued
			- Waiting
			- Running
			- Finished'''	
			
		#FIXME add test for valid job states									
		if self.exists():
			self.connection.commit()
			statement = """SELECT Stability, Scan, Binding FROM %s WHERE JobID='%s' """ % (self.jobTable, self.identification)
			self.cursor.execute(statement)
			rows = self.cursor.fetchall()
			return dict(zip(['Stability', 'Scan', 'Binding'], rows[0]))
		else:
			raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification
Returns the state of the calculations.
		
		This is a dictionary of calculationName:JobState pairs.
		Valid States are 
			- NotSelected
			- Selected
			- Queued
			- Waiting
			- Running
			- Finished
Returns the state of the calculations.
This is a dictionary of calculationName:JobState pairs.
Valid States are
NotSelected
Selected
Queued
Waiting
Running
Finished
Returns the state of the calculations . This is a dictionary of calculationName : JobState pairs . Valid States are NotSelected Selected Queued Waiting Running Finished
def calculationStates(self):
		if self.exists():
			self.connection.commit()
			statement = """SELECT Stability, Scan, Binding FROM %s WHERE JobID='%s' """ % (self.jobTable, self.identification)
			self.cursor.execute(statement)
			rows = self.cursor.fetchall()
			return dict(zip(['Stability', 'Scan', 'Binding'], rows[0]))
		else:
			raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification
def calculationStates ( self ) : if self . exists ( ) : self . connection . commit ( ) statement = """SELECT Stability, Scan, Binding FROM %s WHERE JobID='%s' """ % ( self . jobTable , self . identification ) self . cursor . execute ( statement ) rows = self . cursor . fetchall ( ) return dict ( zip ( [ 'Stability' , 'Scan' , 'Binding' ] , rows [ 0 ] ) ) else : raise Exceptions . DatabaseRetrievalError , "Job Id %s does not exist in the database" % self . identification
Returns the state of the calculations.
Returns the state of the calculations .
'''Returns the state of the calculations.
		
		This is a dictionary of calculationName:JobState pairs.
		Valid States are 
			- NotSelected
			- Selected
			- Queued
			- Waiting
			- Running
			- Finished''' #FIXME add test for valid job states									
self