a lot of work on scaling the bot
This commit is contained in:
1 parent
654383b116
commit
6189aaf39a
4 files changed
+163
-71
No files matched your search
@@ -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)
|
||||
Reference in new issue
Block a user