def get(self, *arg, **kwargs):
     ''' Bot reports here when a remote command has been completed successfully '''
     if 0 < RemoteCommand.qsize(self.bot.id):
         remote_command = RemoteCommand.pop(self.bot.id)
         remote_command.completed = True
         self.dbsession.add(remote_command)
         self.dbsession.flush()
     self.write('ok')
     self.finish()
 def get(self, *arg, **kwargs):
     ''' Bot reports here when a remote command has been completed successfully '''
     if 0 < RemoteCommand.qsize(self.bot.id):
         remote_command = RemoteCommand.pop(self.bot.id)
         remote_command.completed = True
         self.dbsession.add(remote_command)
         self.dbsession.flush()
     self.write('ok')
     self.finish()
 def get(self, *args, **kwargs):
     ''' Updates the last_seen, sends commands if they exist '''
     self.bot.last_seen = datetime.now()
     if 0 < RemoteCommand.qsize(self.bot.id):
         remote_command = RemoteCommand.pop(self.bot.id)
         self.write(remote_command.command)
     else:
         self.write("nop")
     self.dbsession.add(self.bot)
     self.dbsession.flush()
     self.finish()
 def get(self, *args, **kwargs):
     ''' Updates the last_seen, sends commands if they exist '''
     self.bot.last_seen = datetime.now()
     if 0 < RemoteCommand.qsize(self.bot.id):
         remote_command = RemoteCommand.pop(self.bot.id)
         self.write(remote_command.command)
     else:
         self.write("nop")
     self.dbsession.add(self.bot)
     self.dbsession.flush()
     self.finish()