def doReportReceived(self, *args, **kwargs): """ Action method. """ newpacket = args[0] p2p_stats.count_inbox(self.sender_idurl, self.proto, self.status, self.bytes_received) process(newpacket, self)
def doReportCacheFailed(self, *args, **kwargs): """ Action method. """ if args and args[0]: status, bytes_received, _ = args[0] p2p_stats.count_inbox(self.sender_idurl, self.proto, status, bytes_received) lg.out(18, 'packet_in.doReportCacheFailed WARNING : %s' % self.sender_idurl)
def doReportFailed(self, *args, **kwargs): """ Action method. """ try: status, bytes_received, _ = args[0] except: status = 'failed' bytes_received = 0 p2p_stats.count_inbox(self.sender_idurl, self.proto, status, bytes_received)
def doReportFailed(self, *args, **kwargs): """ Action method. """ try: status, bytes_received, _ = args[0] except: status = 'failed' bytes_received = 0 p2p_stats.count_inbox(self.sender_idurl, self.proto, status, bytes_received) lg.warn('incoming packet failed %s with %s' % (self.transfer_id, status, )) if _PacketLogFileEnabled: lg.out(0, ' \033[0;49;31mIN FAILED with status "%s" from %s://%s TID:%s\033[0m' % ( status, self.proto, self.host, self.transfer_id), log_name='packet', showtime=True)
def doReportCacheFailed(self, *args, **kwargs): """ Action method. """ if args and args[0]: status, bytes_received, msg = args[0] p2p_stats.count_inbox(self.sender_idurl, self.proto, status, bytes_received) else: status = 'failed' bytes_received = 0 msg = 'unknown reason' lg.warn('cache failed : %s' % self.sender_idurl) if _PacketLogFileEnabled: lg.out(0, ' \033[0;49;31mIN CACHE FAILED with "%s" for %s TID:%s\033[0m' % ( msg, self.sender_idurl, self.transfer_id), log_name='packet', showtime=True)
def doReportCacheFailed(self, *args, **kwargs): """ Action method. """ if args and args[0]: status, bytes_received, msg = args[0] p2p_stats.count_inbox(self.sender_idurl, self.proto, status, bytes_received) lg.out( 18, 'packet_in.doReportCacheFailed WARNING : %s' % self.sender_idurl) if _Debug: lg.out( 2, ' \033[0;49;31mCACHE FAILED with "%s" for %s TID:%s\033[0m' % (msg, self.sender_idurl, self.transfer_id), log_name='packet')
def doReportFailed(self, *args, **kwargs): """ Action method. """ try: status, bytes_received, _ = args[0] except: status = 'failed' bytes_received = 0 p2p_stats.count_inbox(self.sender_idurl, self.proto, status, bytes_received) lg.out( 18, 'packet_in.doReportFailed WARNING %s with %s' % (self.transfer_id, status)) if _Debug: lg.out( 2, ' \033[0;49;31mFAILED with status "%s" from %s://%s TID:%s\033[0m' % (status, self.proto, self.host, self.transfer_id), log_name='packet')