Example #1
0
 def __request_now_bootstrap(self, directory_id=None, directory=None,
         all_files=True):
     if (not directory_id) and (not directory):
         raise ValueError("You must provide either directory_id or \
                 directory")
     sdb = AirtimeDB(apc.AirtimeApiClient.create_right_config())
     if directory            : directory = os.path.normpath(directory)
     if directory_id == None : directory_id = sdb.to_id(directory)
     if directory    == None : directory = sdb.to_directory(directory_id)
     try:
         bs = Bootstrapper( sdb, self.manager.watch_signal() )
         bs.flush_watch( directory=directory, last_ran=self.cfg.last_ran() )
     except Exception as e:
         self.fatal_exception("Exception bootstrapping: (dir,id)=(%s,%s)" %
                              (directory, directory_id), e)
         raise DirectoryIsNotListed(directory, cause=e)
Example #2
0
 def __request_now_bootstrap(self,
                             directory_id=None,
                             directory=None,
                             all_files=True):
     if (not directory_id) and (not directory):
         raise ValueError("You must provide either directory_id or \
                 directory")
     sdb = AirtimeDB(apc())
     if directory: directory = os.path.normpath(directory)
     if directory_id == None: directory_id = sdb.to_id(directory)
     if directory == None: directory = sdb.to_directory(directory_id)
     try:
         bs = Bootstrapper(sdb, self.manager.watch_signal())
         bs.flush_watch(directory=directory, last_ran=self.cfg.last_ran())
     except Exception as e:
         self.fatal_exception(
             "Exception bootstrapping: (dir,id)=(%s,%s)" %
             (directory, directory_id), e)
         raise DirectoryIsNotListed(directory, cause=e)