コード例 #1
0
    def cancel_pilots(self, uids=None, _timeout=None):
        """
        Cancel one or more :class:`radical.pilot.ComputePilots`.

        **Arguments:**
            * **uids** [`string` or `list of strings`]: The IDs of the
              compute pilot objects to cancel.
        """
        self.is_valid()

        self._log.debug('in cancel_pilots: %s', ru.get_stacktrace())

        if not uids:
            with self._pilots_lock:
                uids = self._pilots.keys()

        if not isinstance(uids, list):
            uids = [uids]

        with self._pilots_lock:
            for uid in uids:
                if uid not in self._pilots:
                    raise ValueError('pilot %s not known' % uid)

        self.publish(rpc.CONTROL_PUBSUB, {'cmd' : 'cancel_pilots', 
                                          'arg' : {'pmgr' : self.uid,
                                                   'uids' : uids}})

        self.wait_pilots(uids=uids, timeout=_timeout)
コード例 #2
0
    def cancel_pilots(self, uids=None, _timeout=None):
        """
        Cancel one or more :class:`radical.pilot.ComputePilots`.

        **Arguments:**
            * **uids** [`string` or `list of strings`]: The IDs of the
              compute pilot objects to cancel.
        """
        self.is_valid()

        self._log.debug('in cancel_pilots: %s', ru.get_stacktrace())

        if not uids:
            with self._pilots_lock:
                uids = self._pilots.keys()

        if not isinstance(uids, list):
            uids = [uids]

        with self._pilots_lock:
            for uid in uids:
                if uid not in self._pilots:
                    raise ValueError('pilot %s not known' % uid)

        self.publish(rpc.CONTROL_PUBSUB, {'cmd' : 'cancel_pilots', 
                                          'arg' : {'pmgr' : self.uid,
                                                   'uids' : uids}})

        self.wait_pilots(uids=uids, timeout=_timeout)
コード例 #3
0
ファイル: stack_traces.py プロジェクト: afcarl/radical.utils
def inner_2(arg_1, arg_2):
    st = ru.get_stacktrace()
    import pprint
    pprint.pprint(st)
コード例 #4
0
def inner_2(arg_1, arg_2):  # pylint: disable=W0613

    st = ru.get_stacktrace()
    pprint.pprint(st)