Beispiel #1
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()
Beispiel #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()
Beispiel #3
0
 def execute(self, bot):
     yield from asyncio.sleep(self.time, loop=bot.loop)
Beispiel #4
0
 def execute(self, bot):
     yield from asyncio.sleep(self.time, loop=bot.loop)