Esempio n. 1
0
 def openTable(self, tableName):
     """
     Open a table input from. By default, tables belong to the parents,
     because they have already finished executing
     
     :param tableName: Name of the table to be opened
     
     :return: :class:`remus.db.table.ReadTable`
     
     In the case of a target::
         
         e02d038d-98a3-494a-9a27-c04b4516ced4:/submit_20120110/the_child
     
     The call::
         
         self.openTable('input')
     
     Would open the table::
         
         e02d038d-98a3-494a-9a27-c04b4516ced4:/submit_20120110/input
     
     Because openTable opens in the parent directory (because the parent has already completed)
     
     
     """
     tablePath = db_join(self.__instance__, self.__tablepath__, "..", tableName)
     return self.__manager__._openTable(tablePath.instance, tablePath.table)
Esempio n. 2
0
 def __run__(self):
     tpath = db_join( self.__instance__, self.__tablepath__, "..", self.__keyTable__)
     self.init()
     src = self.__manager__._openTable(tpath.instance, tpath.table)
     print "src", src.getPath()
     for key, val in src:
         print key
         self.map(key, val)
Esempio n. 3
0
 def addFollowTarget(self, child_name, child, depends=None, chdir=None):
     """
     A follow target is a delayed callback, that isn't run until all 
     of a targets children have complete
     """
     if depends is None:
         self.__manager__._addChild(self, child_name, child, depends=self.__tablepath__ + "@follow", chdir=chdir)
     else:
         refs = []
         if isinstance(depends, str):
             depends = [depends]
         for d in depends:
             refs.append(db_join(self.__instance__, self.__tablepath__, d).table)
         self.__manager__._addChild(self, child_name, child, depends=refs, chdir=chdir)
Esempio n. 4
0
 def getcwd(self):
     return db_join(self.__instance__, self.__tablepath__)
Esempio n. 5
0
 def openTable(self, tableName):
     i = db_join(self.__instance__, tableName)
     print "open table:", i
     return self.__manager__._openTable(i.instance, i.table)
Esempio n. 6
0
 def copyFrom(self, path, srcPath):
     srcPath = db_join(self.__instance__, self.__tablepath__, srcPath)
     self.__manager__._copyFrom(path, srcPath)
Esempio n. 7
0
 def copyTo(self, path, dstPath):
     dstPath = db_join(self.__instance__, self.__tablepath__, dstPath)
     self.__manager__._copyTo(path, dstPath)
Esempio n. 8
0
 def createFile(self, dstPath, info = {}):
     dstPath = db_join(self.__instance__, self.__tablepath__, dstPath)
     self.__manager__._createFile(dstPath, info)