Skip to content

Commit 6e1134b

Browse files
committed
fix routing key
1 parent 91a7319 commit 6e1134b

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

src/aleph/chains/chain_data_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ async def get_tx_messages(
222222

223223
async def make_pending_tx_exchange(config: Config) -> aio_pika.abc.AbstractExchange:
224224
mq_conn = await aio_pika.connect_robust(
225-
host=config.rabbitmq.host.value,
225+
host=config.p2p.mq_host.value,
226226
port=config.rabbitmq.port.value,
227227
login=config.rabbitmq.username.value,
228228
password=config.rabbitmq.password.value,

src/aleph/config.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ def get_defaults():
4848
],
4949
"topics": ["ALIVE", "ALEPH-TEST"],
5050
},
51-
"storage": {"folder": "/var/lib/pyaleph", "store_files": True, "engine": "filesystem"},
51+
"storage": {
52+
"folder": "/var/lib/pyaleph",
53+
"store_files": True,
54+
"engine": "filesystem",
55+
},
5256
"nuls": {
5357
"chain_id": 8964,
5458
"enabled": False,
@@ -124,8 +128,11 @@ def get_defaults():
124128
"password": "change-me!",
125129
"pub_exchange": "p2p-publish",
126130
"sub_exchange": "p2p-subscribe",
131+
# Name of the RabbitMQ exchange used for processed messages (output of the message processor).
127132
"message_exchange": "aleph-messages",
133+
# Name of the RabbitMQ exchange used for pending messages (input of the message processor).
128134
"pending_message_exchange": "aleph-pending-messages",
135+
# Name of the RabbitMQ exchange used for sync/message events (input of the TX processor).
129136
"pending_tx_exchange": "aleph-pending-txs",
130137
},
131138
"redis": {

src/aleph/jobs/process_pending_txs.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ async def process_pending_txs(self) -> None:
100100

101101
async def make_pending_tx_queue(config: Config) -> aio_pika.abc.AbstractQueue:
102102
mq_conn = await aio_pika.connect_robust(
103-
host=config.rabbitmq.host.value,
103+
host=config.p2p.mq_host.value,
104104
port=config.rabbitmq.port.value,
105105
login=config.rabbitmq.username.value,
106106
password=config.rabbitmq.password.value,
@@ -114,14 +114,11 @@ async def make_pending_tx_queue(config: Config) -> aio_pika.abc.AbstractQueue:
114114
pending_tx_queue = await channel.declare_queue(
115115
name="pending-tx-queue", durable=True, auto_delete=False
116116
)
117-
await pending_tx_queue.bind(pending_tx_exchange, routing_key="*")
117+
await pending_tx_queue.bind(pending_tx_exchange, routing_key="#")
118118
return pending_tx_queue
119119

120120

121121
async def handle_txs_task(config: Config):
122-
max_concurrent_tasks = config.aleph.jobs.pending_txs.max_concurrency.value
123-
await asyncio.sleep(4)
124-
125122
engine = make_engine(config=config, application_name="aleph-txs")
126123
session_factory = make_session_factory(engine)
127124

0 commit comments

Comments
 (0)