Fix rescheduling

This commit is contained in:
DenialMC 2015-04-08 20:22:13 +03:00
parent 16dfbb003b
commit 4a01e12091

View file

@ -23,14 +23,15 @@ class DistributedReportMgrAI(DistributedObjectAI):
if not reporter or reporter.isReported(avId): if not reporter or reporter.isReported(avId):
return return
timestamp = int(round(time.time() * 1000)) timestamp = int(round(time.time() * 1000))
self.reports.append('%s|%s|%s|%s' % (timestamp, reporter.doId, avId, category)) self.reports.append('%s|%s|%s|%s' % (timestamp, reporter.doId, avId, category))
def sendAllReports(self): def sendAllReports(self):
self.scheduleReport()
if not self.reports or config.GetString('accountdb-type', 'developer') != 'remote': if not self.reports or config.GetString('accountdb-type', 'developer') != 'remote':
return return
executeHttpRequestAndLog('report', reports=','.join(self.reports)) executeHttpRequestAndLog('report', reports=','.join(self.reports))
self.reports = [] self.reports = []
self.scheduleReport()