def _handle_apply_reply(self, msg):
        parent = msg['parent_header']
        msg_id = parent['msg_id']
        if msg_id not in self.outstanding:
            if msg_id in self.history:
                print(("got stale result: %s"%msg_id))
                print(self.results[msg_id])
                print(msg)
            else:
                print(("got unknown result: %s"%msg_id))
        else:
            self.outstanding.remove(msg_id)
        content = msg['content']
        header = msg['header']
        
        # construct metadata:
        md = self.metadata[msg_id]
        md.update(self._extract_metadata(header, parent, content))
        # is this redundant?
        self.metadata[msg_id] = md
        
        e_outstanding = self._outstanding_dict[md['engine_uuid']]
        if msg_id in e_outstanding:
            e_outstanding.remove(msg_id)
        
        # construct result:
        if content['status'] == 'ok':
            self.results[msg_id] = util.unserialize_object(msg['buffers'])[0]
        elif content['status'] == 'aborted':
            self.results[msg_id] = error.TaskAborted(msg_id)
        elif content['status'] == 'resubmitted':
            # TODO: handle resubmission
            pass
        else:
            self.results[msg_id] = self._unwrap_exception(content)
Start a slack direct messages channel with the test bot
dataset/ETHPy150Open ipython/ipython-py3k/IPython/parallel/client/client.py/Client._handle_apply_reply--crossover with--dataset/ETHPy150Open lins05/slackbot/tests/functional/driver.py/Driver._start_dm_channel