Skip to content

Commit

Permalink
🦄 refactor: change default retry class NeverRetry=>TimesRetry
Browse files Browse the repository at this point in the history
  • Loading branch information
mic1on committed Nov 1, 2023
1 parent efa9912 commit bcf9dac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/onestep/onestep.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from .broker.base import BaseBroker
from .exception import StopMiddleware
from .message import Message
from .retry import NeverRetry
from .retry import TimesRetry
from .signal import message_sent, started, stopped
from .state import State
from .worker import WorkerThread
Expand All @@ -29,7 +29,7 @@ def __init__(self, fn,
to_broker: Union[BaseBroker, List[BaseBroker], None] = None,
workers: Optional[int] = None,
middlewares: Optional[List[Any]] = None,
retry: Union[Callable, object] = NeverRetry(),
retry: Union[Callable, object] = TimesRetry(),
error_callback: Optional[Union[Callable, object]] = None):
self.group = group
self.fn = fn
Expand Down Expand Up @@ -182,7 +182,7 @@ def __init__(self,
to_broker: Union[BaseBroker, List[BaseBroker], None] = None,
workers: Optional[int] = None,
middlewares: Optional[List[Any]] = None,
retry: Union[Callable, object] = NeverRetry(),
retry: Union[Callable, object] = TimesRetry(),
error_callback: Optional[Union[Callable, object]] = None):
self.params = {
"group": group,
Expand Down

0 comments on commit bcf9dac

Please sign in to comment.