atk-common 3.14.0__py3-none-any.whl → 3.15.0__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.
- atk_common/classes/rabbitmq_consumer.py +5 -3
- {atk_common-3.14.0.dist-info → atk_common-3.15.0.dist-info}/METADATA +1 -1
- {atk_common-3.14.0.dist-info → atk_common-3.15.0.dist-info}/RECORD +6 -6
- {atk_common-3.14.0.dist-info → atk_common-3.15.0.dist-info}/WHEEL +0 -0
- {atk_common-3.14.0.dist-info → atk_common-3.15.0.dist-info}/licenses/license.txt +0 -0
- {atk_common-3.14.0.dist-info → atk_common-3.15.0.dist-info}/top_level.txt +0 -0
@@ -10,7 +10,7 @@ CONNECTION_ERRORS = (
|
|
10
10
|
)
|
11
11
|
|
12
12
|
class RabbitMQConsumer:
|
13
|
-
def __init__(self, queue_name, user, pwd, host, vhost, dlx, dlq, content_type, message_handler, logger: ILogger):
|
13
|
+
def __init__(self, queue_name, user, pwd, host, vhost, dlx, dlq, content_type, message_handler, prefetch_count, logger: ILogger):
|
14
14
|
self.logger = logger
|
15
15
|
|
16
16
|
rabbit_url = 'amqp://' + user + ':' + pwd + '@' + host + '/' + vhost
|
@@ -26,8 +26,9 @@ class RabbitMQConsumer:
|
|
26
26
|
else:
|
27
27
|
queue = Queue(name=queue_name)
|
28
28
|
self.queue = queue
|
29
|
-
self.content_type = content_type
|
30
|
-
self.message_handler = message_handler
|
29
|
+
self.content_type = content_type
|
30
|
+
self.message_handler = message_handler
|
31
|
+
self.prefetch_count = prefetch_count
|
31
32
|
|
32
33
|
def _consume(self):
|
33
34
|
conn = self._establish_connection()
|
@@ -59,6 +60,7 @@ class RabbitMQConsumer:
|
|
59
60
|
accept=[self.content_type] if self.content_type else None)
|
60
61
|
consumer.revive(channel)
|
61
62
|
consumer.consume()
|
63
|
+
consumer.qos(prefetch_count=self.prefetch_count, apply_global=False)
|
62
64
|
self.logger.info("Connection revived!")
|
63
65
|
return revived_connection
|
64
66
|
|
@@ -22,7 +22,7 @@ atk_common/classes/docker_handler.py,sha256=VNJecc2ZWcpwNBa61QTGM_kYrsoZTjktMcFR
|
|
22
22
|
atk_common/classes/env_handler.py,sha256=h3snKwHwDvfc2dt1vgHasqv8n_vnsI9J2MAr-XM5oow,1283
|
23
23
|
atk_common/classes/error_handler.py,sha256=DgRzWx4Yu8PKX1bqj55aWhrkqb92ebDaEwtxgKhTLls,3270
|
24
24
|
atk_common/classes/http_response_handler.py,sha256=qgtGyEwUe4lIiayS6syWanr2VE6GaKHddazNL_PxEFM,2327
|
25
|
-
atk_common/classes/rabbitmq_consumer.py,sha256=
|
25
|
+
atk_common/classes/rabbitmq_consumer.py,sha256=alqn12Hfdl0dc4B0lMe4jNB4sYDzsRWwcWSwY-wGPzE,3004
|
26
26
|
atk_common/enums/__init__.py,sha256=JjIQ_bHIGxfWtf9Mlj36Gumll4otgLj0cR_oXF46XyY,2736
|
27
27
|
atk_common/enums/api_error_type_enum.py,sha256=9oW6ZaZ3lhMwR8r2sVNWGliS9C_jV-otiOYdezAuTp0,91
|
28
28
|
atk_common/enums/camera_cabinet_type_enum.py,sha256=U2NVrsTCBgaMRwYJamnjshAW8Y7xlOVjvUzakdgVH9A,90
|
@@ -82,7 +82,7 @@ atk_common/utils/http_utils.py,sha256=eSRuQeDgN0ISQdByZqE6cIGXoorcAXz7PEtVntHUKA
|
|
82
82
|
atk_common/utils/internal_response_utils.py,sha256=2X9eLFEy1pO3Aesj1IRXg2yprwNcBDM5_dXaA5vfmMI,694
|
83
83
|
atk_common/utils/mq_utils.py,sha256=DmVcXIZHG45p7cQVvgen6OT8QbW_UifFFJGJBybTkJQ,1835
|
84
84
|
atk_common/utils/str_utils.py,sha256=sg3jwTTIfQvgGP-lcY5Xh4PXXhKWse_4HswBQYQKEo4,260
|
85
|
-
atk_common-3.
|
85
|
+
atk_common-3.15.0.dist-info/licenses/license.txt,sha256=_0O6fWM00-wTurDjnZhUP_N5QiwGhItaQZqHq5eqadA,1063
|
86
86
|
atk_package/__init__.py,sha256=okIFEefQhQrw6DZg6oCEVWsEdkVCk-57VXBW0IUG_wU,834
|
87
87
|
atk_package/datetime_utils.py,sha256=qsVF7l90P1-xukG2tV_jLqG9J_Yfl5wTpyfrdPBlyMo,239
|
88
88
|
atk_package/env_utils.py,sha256=bXOrxM3fZUslqfmZt75iphbEJHbG4riJa8XOVzPwIII,313
|
@@ -95,7 +95,7 @@ atk_package/enums/__init__.py,sha256=EtUr_--MQj1Rc_R0sF_ELXIThmhpfmhDWq3YaK9oQMk
|
|
95
95
|
atk_package/enums/command_status_enum.py,sha256=M2Nln27a_DbzI07-gfytWQk2X087JhkU6Fmard5qVHs,127
|
96
96
|
atk_package/enums/speed_control_status_enum.py,sha256=qpURh0K1L1tSpbrzVnckoe4hUn1illIkbo7k4mLfzIM,182
|
97
97
|
shared_python_atk_enforcement/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
98
|
-
atk_common-3.
|
99
|
-
atk_common-3.
|
100
|
-
atk_common-3.
|
101
|
-
atk_common-3.
|
98
|
+
atk_common-3.15.0.dist-info/METADATA,sha256=a8E6d-jE1YhKZwFb90pPdAVyn2TTen_bcvh8OPInjLo,1761
|
99
|
+
atk_common-3.15.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
100
|
+
atk_common-3.15.0.dist-info/top_level.txt,sha256=4CwRjkLnheIdI4jQwc4tK3dbRc58WqUmoqjkdDTWlME,41
|
101
|
+
atk_common-3.15.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|