Example #1
0
 def receive_deleted_download_id(self):
     answer = receive_answer(self.sock)
     self.log.info('Answer with deleted download id: %s', answer)
     if answer['id']:
         url_id = answer['id']
     self.log.info('Deleted url id = %s', url_id)
     return url_id
Example #2
0
 def receive_download_status(self):
     answer = receive_answer(self.sock)
     self.log.info('Answer with download status: %s', answer)
     if not answer['start_download']:
         url_id = 0
     elif answer['start_download']:
         url_id = answer['url_id']
     self.log.info('Url id = %s', url_id)
     return url_id
Example #3
0
 def _clientthread(self, conn):
     self.log.info('New thread')
     try:
         self.log.info('TRY TO GET REQUEST')
         msg = receive_answer(conn)
         self.log.info('Message: %s', msg)
         self.log.info(msg)
         answer = self.performance_messages_request(msg)
         self.log.info('Answer for client request: %s', answer)
         send_msg(conn, answer)
         conn.close()
     except Exception:
         self.log.info('Exception in processing request')
         self.log.info(traceback.format_exc())
Example #4
0
 def _clientthread(self, conn):
     self.log.info("New thread")
     try:
         self.log.info("TRY TO GET REQUEST")
         msg = receive_answer(conn)
         self.log.info("Message: %s", msg)
         self.log.info(msg)
         answer = self.performance_messages_request(msg)
         self.log.info("Answer for client request: %s", answer)
         send_msg(conn, answer)
         conn.close()
     except Exception:
         self.log.info("Exception in processing request")
         self.log.info(traceback.format_exc())
Example #5
0
 def receive_status(self):
     answer = receive_answer(self.sock)
     self.log.info('Answer with downloading status: %s', answer)
     return answer