def start_command(self, protocol, command_id, command, args): """ This gets invoked by L{buildbot.process.step.RemoteCommand.start}, as part of various master-side BuildSteps, to start various commands that actually do the build. I return nothing. Eventually I will call .commandComplete() to notify the master-side RemoteCommand that I'm done. """ command = decode(command) args = decode(args) def on_command_complete(): del self.protocol_commands[command_id] protocol_command = ProtocolCommandMsgpack( self.unicode_encoding, self.basedir, self.running, on_command_complete, protocol, command_id, command, args) self.protocol_commands[command_id] = protocol_command log.msg(u" startCommand:{0} [id {1}]".format(command, command_id)) protocol_command.protocol_notify_on_disconnect() d = protocol_command.command.doStart() d.addCallback(lambda res: None) d.addBoth(protocol_command.command_complete) return None
def remote_startCommand(self, stepref, stepId, command, args): """ This gets invoked by L{buildbot.process.step.RemoteCommand.start}, as part of various master-side BuildSteps, to start various commands that actually do the build. I return nothing. Eventually I will call .commandComplete() to notify the master-side RemoteCommand that I'm done. """ stepId = decode(stepId) command = decode(command) args = decode(args) self.activity() if self.command: log.msg("leftover command, dropping it") self.stopCommand() try: factory = registry.getFactory(command) except KeyError: raise UnknownCommand(u"unrecognized WorkerCommand '{0}'".format(command)) self.command = factory(self, stepId, args) log.msg(u" startCommand:{0} [id {1}]".format(command, stepId)) self.remoteStep = stepref self.remoteStep.notifyOnDisconnect(self.lostRemoteStep) d = self.command.doStart() d.addCallback(lambda res: None) d.addBoth(self.commandComplete) return None
def remote_startCommand(self, command_ref, stepId, command, args): """ This gets invoked by L{buildbot.process.step.RemoteCommand.start}, as part of various master-side BuildSteps, to start various commands that actually do the build. I return nothing. Eventually I will call .commandComplete() to notify the master-side RemoteCommand that I'm done. """ stepId = decode(stepId) command = decode(command) args = decode(args) if self.protocol_command: log.msg("leftover command, dropping it") self.stopCommand() def on_command_complete(): self.protocol_command = None self.protocol_command = self.ProtocolCommand( self.unicode_encoding, self.bot.basedir, self.basedir, self.running, on_command_complete, self.lostRemoteStep, command, stepId, args, command_ref) log.msg(u" startCommand:{0} [id {1}]".format(command, stepId)) self.protocol_command.protocol_notify_on_disconnect() d = self.protocol_command.command.doStart() d.addCallback(lambda res: None) d.addBoth(self.protocol_command.command_complete) return None