Exemplo n.º 1
0
def handle_gcollectwait(bot, ievent):
    try:
        newwait = int(ievent.args[0])
    except (IndexError, ValueError):
        ievent.reply('gcollect wait is %s seconds' % state['wait'])
        return
    if newwait < 60:
        ievent.reply('min. number of seconds is 60')
        return
    state['wait'] = newwait
    state.save()
    if pid:
        periodical.changeinterval(pid, newwait)
    ievent.reply('gcollect wait set to %s' % state['wait'])
Exemplo n.º 2
0
def handle_gcollectwait(bot, ievent):
    try:
        newwait = int(ievent.args[0])
    except (IndexError, ValueError):
        ievent.reply('gcollect wait is %s seconds' % state['wait'])
        return
    if newwait < 60:
        ievent.reply('min. number of seconds is 60')
        return
    state['wait'] = newwait
    state.save()
    if pid:
        periodical.changeinterval(pid, newwait)
    ievent.reply('gcollect wait set to %s' % state['wait'])
Exemplo n.º 3
0
 def changeinterval(self, name, interval):
     periodical.changeinterval(self.jobids[name], interval)
Exemplo n.º 4
0
 def changeinterval(self, name, interval):
     periodical.changeinterval(self.jobids[name], interval)