Example #1
0
File: pager.py Project: Wooble/irc3
 def clean_old_pages(self):  # pragma: no cover
     self.context.log.debug('Cleaning old pages...')
     t = time.time()
     d = []
     for k, v in self.pages.items():
         if v.time + self.expiration_delay > t:
             d.append(k)
     for k in d:
         page = self.pages[k]
         page.close()
     yield from asyncio.sleep(60, loop=self.context.loop)
     yield from self.clean_old_pages()
Example #2
0
 def clean_old_pages(self):  # pragma: no cover
     self.context.log.debug('Cleaning old pages...')
     t = time.time()
     d = []
     for k, v in self.pages.items():
         if v.time + self.expiration_delay > t:
             d.append(k)
     for k in d:
         page = self.pages[k]
         page.close()
     yield from asyncio.sleep(60, loop=self.context.loop)
     yield from self.clean_old_pages()
Example #3
0
 def execute(self, bot):
     yield from asyncio.sleep(self.time, loop=bot.loop)
Example #4
0
 def execute(self, bot):
     yield from asyncio.sleep(self.time, loop=bot.loop)