a lot of work on scaling the bot

This commit is contained in:
matnad committed 2019-02-21 19:56:03 +01:00
1 parent 654383b116
commit 6189aaf39a
4 files changed
+163 -71

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
import asyncio
class UniqueQueue(asyncio.Queue):
async def put_unique_id(self, item):
if not item.get('id'):
return
if item.get('id') not in [v.get('id') for v in self._queue]:
await self.put(item)