onestep 0.3.8__py3-none-any.whl → 0.3.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of onestep might be problematic. Click here for more details.
- onestep/__init__.py +1 -3
- onestep/exception.py +8 -0
- onestep/onestep.py +1 -0
- onestep/signal.py +1 -0
- onestep/worker.py +7 -3
- {onestep-0.3.8.dist-info → onestep-0.3.9.dist-info}/METADATA +1 -1
- {onestep-0.3.8.dist-info → onestep-0.3.9.dist-info}/RECORD +9 -9
- {onestep-0.3.8.dist-info → onestep-0.3.9.dist-info}/WHEEL +1 -1
- {onestep-0.3.8.dist-info → onestep-0.3.9.dist-info}/entry_points.txt +0 -0
onestep/__init__.py
CHANGED
|
@@ -23,8 +23,6 @@ __all__ = [
|
|
|
23
23
|
# broker
|
|
24
24
|
'BaseBroker',
|
|
25
25
|
'BaseConsumer',
|
|
26
|
-
'BaseLocalBroker',
|
|
27
|
-
'BaseLocalConsumer',
|
|
28
26
|
'MemoryBroker',
|
|
29
27
|
'RabbitMQBroker',
|
|
30
28
|
'WebHookBroker',
|
|
@@ -61,4 +59,4 @@ __all__ = [
|
|
|
61
59
|
'__version__'
|
|
62
60
|
]
|
|
63
61
|
|
|
64
|
-
__version__ = '0.3.
|
|
62
|
+
__version__ = '0.3.9'
|
onestep/exception.py
CHANGED
onestep/onestep.py
CHANGED
onestep/signal.py
CHANGED
onestep/worker.py
CHANGED
|
@@ -14,8 +14,8 @@ from asgiref.sync import async_to_sync
|
|
|
14
14
|
from .message import Message
|
|
15
15
|
from .retry import RetryStatus
|
|
16
16
|
from .broker import BaseBroker
|
|
17
|
-
from .
|
|
18
|
-
from .signal import message_received, message_consumed, message_error, message_drop
|
|
17
|
+
from . import exception
|
|
18
|
+
from .signal import message_received, message_consumed, message_error, message_drop, message_requeue
|
|
19
19
|
|
|
20
20
|
logger = logging.getLogger(__name__)
|
|
21
21
|
|
|
@@ -82,10 +82,14 @@ class BaseWorker:
|
|
|
82
82
|
message.confirm()
|
|
83
83
|
|
|
84
84
|
self.instance.after_emit("consume", message=message)
|
|
85
|
-
except DropMessage as e:
|
|
85
|
+
except (exception.DropMessage, exception.RejectMessage) as e:
|
|
86
86
|
message_drop.send(self, message=message, reason=e)
|
|
87
87
|
logger.warning(f"{self.instance.name} dropped <{type(e).__name__}: {str(e)}>")
|
|
88
88
|
message.reject()
|
|
89
|
+
except exception.RequeueMessage as e:
|
|
90
|
+
message_requeue.send(self, message=message, reason=e)
|
|
91
|
+
logger.warning(f"{self.instance.name} requeue <{type(e).__name__}: {str(e)}>")
|
|
92
|
+
message.requeue(is_source=True)
|
|
89
93
|
except Exception as e:
|
|
90
94
|
message_error.send(self, message=message, error=e)
|
|
91
95
|
if self.instance.state.debug:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
onestep/__init__.py,sha256=
|
|
1
|
+
onestep/__init__.py,sha256=i2ggViIkU4GyPITpeRDv88PSMfqxXdWnyGpCwtc3I6c,1417
|
|
2
2
|
onestep/_utils.py,sha256=ySYmy-o2o3BurvLfuLWKGXR8TLwug6aTDNMvA3_QjKM,414
|
|
3
3
|
onestep/broker/__init__.py,sha256=L-roNwPZVKsjytOlKCOlyAyvfejI28FyOj9uzfyXcrk,257
|
|
4
4
|
onestep/broker/base.py,sha256=Ryo-0YekdZfpfSSqdmh7jsmNONc_GmlYFYadt_n5bds,4141
|
|
@@ -10,18 +10,18 @@ onestep/broker/redis/pubsub.py,sha256=_p2bKqXu0gYjKz2DsS8UdpkN5dCy94xf_xYx5NFuKp
|
|
|
10
10
|
onestep/broker/redis/stream.py,sha256=uQJncD93Fz8pdP_NdgyQ1UAXwIouh7AFA9_naXaeiJM,3470
|
|
11
11
|
onestep/broker/webhook.py,sha256=Zg22QxKPqJzdxjBsglUcL7P1RcM8FltcHpHXJiJPYgM,2392
|
|
12
12
|
onestep/cli.py,sha256=KfJFpccpfNrhULJmDymrW5bFBGXapdL57ESZdgaFbG8,1399
|
|
13
|
-
onestep/exception.py,sha256=
|
|
13
|
+
onestep/exception.py,sha256=T-tqfRrJZT9Y85qe-1l-1PcHZzV2jxv-61HAhOc4AKE,753
|
|
14
14
|
onestep/message.py,sha256=W37HKnIDxpd5UmtDbPTw2DTb3lfxu9Vs2KYIiCr5b2s,4057
|
|
15
15
|
onestep/middleware/__init__.py,sha256=MP_45lqr4pecmbzQBnn2-AODQ0N_Fss8nl2SA7Zzljo,347
|
|
16
16
|
onestep/middleware/base.py,sha256=adWQ_Lx2Nkaw4ySojIaa3lwUIUu97pHR_l5YMr0lrbw,975
|
|
17
17
|
onestep/middleware/config.py,sha256=WZIvGXhpdSQRAFTbEWXcZdnhFcbvhGkLdkFIj-_QuZM,2438
|
|
18
18
|
onestep/middleware/unique.py,sha256=e3nWHW2yxHFWT9PqiA96sOA1CZZVTbC3bOwUgxN9iaQ,1351
|
|
19
|
-
onestep/onestep.py,sha256=
|
|
19
|
+
onestep/onestep.py,sha256=IQGOfhfbneXCaINqMzO-5wjWpmE5dISEZQtmG3bZ3EU,9372
|
|
20
20
|
onestep/retry.py,sha256=_bl_-0FEMai9KLZ0DkamYwUoUVPf6BjUDpn8SrfqQV4,3009
|
|
21
|
-
onestep/signal.py,sha256=
|
|
21
|
+
onestep/signal.py,sha256=tz9bGzTFZeBviG_iaGLfy4OyFKlWat6szEI6kWEGfTA,337
|
|
22
22
|
onestep/state.py,sha256=UVG91CXCabU64X6qgcO0S7RzbBP8ut0ID7aTMww94us,618
|
|
23
|
-
onestep/worker.py,sha256=
|
|
24
|
-
onestep-0.3.
|
|
25
|
-
onestep-0.3.
|
|
26
|
-
onestep-0.3.
|
|
27
|
-
onestep-0.3.
|
|
23
|
+
onestep/worker.py,sha256=A-XKvWz7ceRodMItjHKSN9DVTk3OoA0jsfmmBZ9z19U,6449
|
|
24
|
+
onestep-0.3.9.dist-info/METADATA,sha256=vHgxQhvMs0XjQ1JSKL0AjUddc0XPmk8tXlomZ51isuY,2522
|
|
25
|
+
onestep-0.3.9.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
26
|
+
onestep-0.3.9.dist-info/entry_points.txt,sha256=ZfWnNQqiGujz2PPLjSlKPocOFRryL7Ot0vQ41TU1xw0,44
|
|
27
|
+
onestep-0.3.9.dist-info/RECORD,,
|
|
File without changes
|