This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
from collections import deque | |
class AsyncioPool: | |
def __init__(self, concurrency, loop=None): | |
""" | |
@param loop: asyncio loop | |
@param concurrency: Maximum number of concurrently running tasks | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
from asyncio.queues import Queue | |
TERMINATOR = object() | |
class TaskPool(object): | |
def __init__(self, loop, num_workers): | |
self.loop = loop | |
self.tasks = Queue(loop=self.loop) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/var/log/supervisor/*.log { | |
weekly | |
rotate 52 | |
compress | |
delaycompress | |
notifempty | |
missingok | |
copytruncate | |
} |
NewerOlder