Commits
Click on a commit to change the comparison rangeAdd cleanup() method to base Consumer class
This fixes an AttributeError that occurs when using non-memory messaging
brokers (like Redis) during server shutdown. The cleanup() method was
added to the memory Consumer in commit 884b1fd8596 but was not added to
the abstract base class, causing the Redis Consumer to fail when
EventPersister.stop() calls self.consumer.cleanup().
The fix adds a default no-op cleanup() method to the base Consumer class,
which is appropriate for consumers that don't need explicit cleanup (like
Redis), while allowing subclasses to override it when needed (like the
memory Consumer does to unsubscribe from topics).
Fixes the error:
AttributeError: 'Consumer' object has no attribute 'cleanup'
Co-Authored-By: Nate Nowack <nate@prefect.io>14 hours ago
by devin-ai-integration[bot]