bearrundr / bots

Automatically exported from code.google.com/p/bots
0 stars 0 forks source link

bots_communication_failure counters: domein too long for db field #347

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
domein and idchannel are both 35 long.

communication.py line 122:
    domain = u'bots_communication_failure_' + self.channeldict['idchannel']

Since the prefix added is 27 long, only channel names of 8 long can fit (using 
MySQL db that enforces max length)

quick fix would be to shorten the prefix to a single character, eg:
    domain = u'#' + self.channeldict['idchannel']

Original issue reported on code.google.com by mjg1964 on 5 Apr 2015 at 11:28

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
better fix
domain = (self.channeldict['idchannel'] + u'_failure')[:35]

Original comment by mjg1964 on 8 Apr 2015 at 12:27

GoogleCodeExporter commented 8 years ago

Original comment by hjebb...@gmail.com on 20 May 2015 at 3:57