def submit_jobs(self, jobnum_list, task):
		if not self._begin_bulk_submission():  # Trying to delegate proxy failed
			if self._force_delegate:  # User switched on forcing delegation => exception
				raise BackendError('Unable to delegate proxy!')
			self._log.error('Unable to delegate proxy! Continue with automatic delegation...')
			self._submit_args_dict.update({'-a': ' '})
			self._use_delegate = False
		for result in GridWMS.submit_jobs(self, jobnum_list, task):
			yield result
Example #2
0
 def submit_jobs(self, jobnum_list, task):
     if not self._begin_bulk_submission(
     ):  # Trying to delegate proxy failed
         self._log.error(
             'Unable to delegate proxy! Continue with automatic delegation...'
         )
         self._submit_args_dict.update({'-a': ' '})
         self._use_delegate = False
     for result in GridWMS.submit_jobs(self, jobnum_list, task):
         yield result
Example #3
0
 def submit_jobs(self, jobnum_list, task):
     if not self._begin_bulk_submission(
     ):  # Trying to delegate proxy failed
         if self._force_delegate:  # User switched on forcing delegation => exception
             raise BackendError('Unable to delegate proxy!')
         self._log.error(
             'Unable to delegate proxy! Continue with automatic delegation...'
         )
         self._submit_args_dict.update({'-a': ' '})
         self._use_delegate = False
     for result in GridWMS.submit_jobs(self, jobnum_list, task):
         yield result
Example #4
0
    def submit_jobs(self, jobnum_list, task):
        import os

        activity = Activity("Waiting for lock to be released...")
        while os.path.isfile(self._lock_filename):
            time.sleep(2)
        file = open(self._lock_filename, "w+")
        activity.finish()
        activity = Activity("Lock acquired:" + self._lock_filename)
        activity.finish()

        t = self._begin_bulk_submission()
        while not t:
            activity = Activity(
                'waiting before trying to delegate proxy again...')
            time.sleep(900)
            activity.finish()
            activity = Activity('re-attempting to delegate proxy...')
            t = self._begin_bulk_submission()
            activity.finish()
        '''
		if not self._begin_bulk_submission():  # Trying to delegate proxy failed
			self._log.error('Unable to delegate proxy! Continue with automatic delegation...')
			self._submit_args_dict.update({'-a': ' '})
			self._use_delegate = False
		'''

        count_submitted = 0
        for result in GridWMS.submit_jobs(self, jobnum_list, task):
            count_submitted += 1
            yield result
        file.close()
        self._log.info('count_submitted: %d' % count_submitted)
        count_submitted = int(count_submitted * 0.2)

        x = threading.Thread(target=self.delfile,
                             args=(self._lock_filename, count_submitted,
                                   self._log))
        x.start()