PEATSA/WebApp/Data.py
def createRun(self, name=None, calculations=[], metadata={}):

		'''Creates a new Run.
		
		Parameters 
			name - A string used to identify the run
			If not provided defaults to Run%d where %d is the number of the run in the run table	
		
		Returns:
			A instance of the Job class'''

		#Create a unique id for the job
		runId = UtilityFunctions.GetNewSID(self.groupId)
		
		if name is None:
			name = "Run%d" % (len(self.allRuns()))

		#Serialize metadata
		data = SerializeDictionary(metadata)
		data = MySQLdb.escape_string(data)	

		#Create the insert SQL command 		
		dateString = UtilityFunctions.CreateDateString()
		data = (self.runTable, runId, name, dateString, data)
		insertQuery = """INSERT INTO %s (RunID, Name, Date, Metadata) VALUES ('%s', '%s', '%s', '%s')""" % data
				
		res = self.cursor.execute(insertQuery)
		self.connection.commit()
		run = Run(runId, self.connection, self.groupId)
		
		return run
Creates a new Run.
		
		Parameters 
			name - A string used to identify the run
			If not provided defaults to Run%d where %d is the number of the run in the run table	
		
		Returns:
			A instance of the Job class
Creates a new Run.
Parameters
name - A string used to identify the run
If not provided defaults to Run%d where %d is the number of the run in the run table
Creates a new Run . Parameters name - A string used to identify the run If not provided defaults to Run%d where %d is the number of the run in the run table
def createRun(self, name=None, calculations=[], metadata={}):
		runId = UtilityFunctions.GetNewSID(self.groupId)
		if name is None:
			name = "Run%d" % (len(self.allRuns()))
		data = SerializeDictionary(metadata)
		data = MySQLdb.escape_string(data)	
		dateString = UtilityFunctions.CreateDateString()
		data = (self.runTable, runId, name, dateString, data)
		insertQuery = """INSERT INTO %s (RunID, Name, Date, Metadata) VALUES ('%s', '%s', '%s', '%s')""" % data
		res = self.cursor.execute(insertQuery)
		self.connection.commit()
		run = Run(runId, self.connection, self.groupId)
		return run
def createRun ( self , name = None , calculations = [ ] , metadata = { } ) : runId = UtilityFunctions . GetNewSID ( self . groupId ) if name is None : name = "Run%d" % ( len ( self . allRuns ( ) ) ) data = SerializeDictionary ( metadata ) data = MySQLdb . escape_string ( data ) dateString = UtilityFunctions . CreateDateString ( ) data = ( self . runTable , runId , name , dateString , data ) insertQuery = """INSERT INTO %s (RunID, Name, Date, Metadata) VALUES ('%s', '%s', '%s', '%s')""" % data res = self . cursor . execute ( insertQuery ) self . connection . commit ( ) run = Run ( runId , self . connection , self . groupId ) return run
Creates a new Run.
Creates a new Run .
'''Creates a new Run.
		
		Parameters 
			name - A string used to identify the run
			If not provided defaults to Run%d where %d is the number of the run in the run table	
		
		Returns:
			A instance of the Job class''' #Create a unique id for the job #Serialize metadata #Create the insert SQL command 		
A instance of the Job class
A instance of the Job class
self
name
calculations
metadata