Skip confirming publish rabitmq

This commit is contained in:
Viet Anh Nguyen 2023-12-14 13:26:16 +07:00
parent a3459fe886
commit 90824fa963
7 changed files with 11 additions and 11 deletions

View File

@ -22,7 +22,7 @@ class CeleryConnector:
app = Celery( app = Celery(
"postman", "postman",
broker=env.str("CELERY_BROKER", "amqp://test:test@rabbitmq:5672"), broker=env.str("CELERY_BROKER", "amqp://test:test@rabbitmq:5672"),
broker_transport_options={'confirm_publish': True}, broker_transport_options={'confirm_publish': False},
) )
def process_id_result(self, args): def process_id_result(self, args):

View File

@ -19,7 +19,7 @@ class CeleryConnector:
app = Celery( app = Celery(
"postman", "postman",
broker= env.str("CELERY_BROKER", "amqp://test:test@rabbitmq:5672"), broker= env.str("CELERY_BROKER", "amqp://test:test@rabbitmq:5672"),
broker_transport_options={'confirm_publish': True}, broker_transport_options={'confirm_publish': False},
) )
# mock task for FI # mock task for FI

View File

@ -12,7 +12,7 @@ app: Celery = Celery(
include=[ include=[
"celery_worker.mock_process_tasks", "celery_worker.mock_process_tasks",
], ],
broker_transport_options={'confirm_publish': True}, broker_transport_options={'confirm_publish': False},
) )
task_exchange = Exchange("default", type="direct") task_exchange = Exchange("default", type="direct")
task_create_missing_queues = False task_create_missing_queues = False

View File

@ -11,7 +11,7 @@ app: Celery = Celery(
include=[ include=[
"celery_worker.mock_process_tasks_fi", "celery_worker.mock_process_tasks_fi",
], ],
broker_transport_options={'confirm_publish': True}, broker_transport_options={'confirm_publish': False},
) )
task_exchange = Exchange("default", type="direct") task_exchange = Exchange("default", type="direct")
task_create_missing_queues = False task_create_missing_queues = False

View File

@ -37,7 +37,7 @@ class CeleryConnector:
app = Celery( app = Celery(
'postman', 'postman',
broker=settings.BROKER_URL, broker=settings.BROKER_URL,
broker_transport_options={'confirm_publish': True}, broker_transport_options={'confirm_publish': False},
) )
def do_pdf(self, args): def do_pdf(self, args):
return self.send_task('do_pdf', args) return self.send_task('do_pdf', args)

View File

@ -13,7 +13,7 @@ app: Celery = Celery(
'postman', 'postman',
broker=settings.BROKER_URL, broker=settings.BROKER_URL,
include=['fwd_api.celery_worker.process_result_tasks', 'fwd_api.celery_worker.internal_task'], include=['fwd_api.celery_worker.process_result_tasks', 'fwd_api.celery_worker.internal_task'],
broker_transport_options={'confirm_publish': True}, broker_transport_options={'confirm_publish': False},
) )
app.conf.update({ app.conf.update({

View File

@ -94,14 +94,14 @@ def process_file(data):
invoice_files = [
('invoice_file', ('invoice.pdf', open("test_samples/20220303025923NHNE_20220222_Starhub_Order_Confirmation_by_Email.pdf", "rb").read())),
]
# invoice_files = [ # invoice_files = [
# ('invoice_file', ('invoice.jpg', open("test_samples/sbt/invoice.jpg", "rb").read())), # ('invoice_file', ('invoice.pdf', open("test_samples/20220303025923NHNE_20220222_Starhub_Order_Confirmation_by_Email.pdf", "rb").read())),
# ] # ]
invoice_files = [
('invoice_file', ('invoice.jpg', open("test_samples/sbt/invoice.jpg", "rb").read())),
]
imei_files = [ imei_files = [
('imei_files', ("test_samples/sbt/imei1.jpg", open("test_samples/sbt/invoice.jpg", "rb").read())), ('imei_files', ("test_samples/sbt/imei1.jpg", open("test_samples/sbt/imei1.jpg", "rb").read())),
('imei_files', ("test_samples/sbt/imei2.jpg", open("test_samples/sbt/imei2.jpg", "rb").read())), ('imei_files', ("test_samples/sbt/imei2.jpg", open("test_samples/sbt/imei2.jpg", "rb").read())),
('imei_files', ("test_samples/sbt/imei3.jpg", open("test_samples/sbt/imei3.jpg", "rb").read())), ('imei_files', ("test_samples/sbt/imei3.jpg", open("test_samples/sbt/imei3.jpg", "rb").read())),
('imei_files', ("test_samples/sbt/imei4.jpeg", open("test_samples/sbt/imei4.jpeg", "rb").read())), ('imei_files', ("test_samples/sbt/imei4.jpeg", open("test_samples/sbt/imei4.jpeg", "rb").read())),