You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In ImageFileConsumer._consume we check that the hash's status is not a finished status. This seems pretty useful, and should probably be moved into the BaseConsumer class, perhaps in get_redis_hash. That way, future custom consumers can do not need to implement it themselves.
After more consideration, I'm not sure how useful this would be.
Yes, the BaseConsumer can check the status of the hash before we pass it to _consume. But we will still have a _consume function defined that takes in a Redish hash and only needs to do work if the hash's status is valid. It seems like that logic should be incorporated into _consume, and not into whatever function calls _consume.
Even if we baked the log into the parent class, new consumers would be required to call super, which is a bit less clear about what's going on.
In
ImageFileConsumer._consume
we check that the hash's status is not a finished status. This seems pretty useful, and should probably be moved into theBaseConsumer
class, perhaps inget_redis_hash
. That way, future custom consumers can do not need to implement it themselves.Originally posted by @willgraf in #115
The text was updated successfully, but these errors were encountered: