Skip to content

Commit

Permalink
don't remove messages from buffer that don't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
witlox committed Jul 3, 2019
1 parent 88aefda commit 7ad3d1a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions dcron/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,12 @@ def clean_buffer(self, uuid):
"""
self.logger.debug("removing message {0} from buffer".format(uuid))
g = group(self._buffer)
for p in g[uuid]:
if p in self._buffer:
self._buffer.remove(p)
if uuid in g:
for p in g[uuid]:
if p in self._buffer:
self._buffer.remove(p)
else:
self.logger.warning("message {0} not in buffer, skipping clean".format(uuid))

async def process(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

from setuptools import setup

version = "0.9.13"
version = "0.9.14"

requirements = ['aiohttp',
'aiofiles',
Expand Down

0 comments on commit 7ad3d1a

Please sign in to comment.