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
As of #685 getting merged, BaseStrategy.add() method receives flumine as an argument. This makes it elegant to add e.g. strategy-specific middleware or workers inside the strategy itself. The problem arises when multiple strategies require the same resource and add it multiple times.
As with streams, all the methods outlined below should check whether a resource has already been added and reject duplicates. The test should be if resource not in [resource_1, resource_2, ...] then add_resource(). It would then be expected of the end user to override __eq__() method of each custom resource to determine what constitutes a duplicate.
As of #685 getting merged,
BaseStrategy.add()
method receivesflumine
as an argument. This makes it elegant to add e.g. strategy-specific middleware or workers inside the strategy itself. The problem arises when multiple strategies require the same resource and add it multiple times.As with streams, all the methods outlined below should check whether a resource has already been added and reject duplicates. The test should be
if resource not in [resource_1, resource_2, ...] then add_resource()
. It would then be expected of the end user to override__eq__()
method of each custom resource to determine what constitutes a duplicate.flumine/flumine/baseflumine.py
Lines 102 to 122 in bfaa5de
The text was updated successfully, but these errors were encountered: