Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Use files.verified shovel
Browse files Browse the repository at this point in the history
We should publish to this queue whenever we have successfully verified a file.
  • Loading branch information
jonandernovella committed Jun 24, 2020
1 parent 3531a6d commit 5cd5bd0
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,32 @@ cat > "/var/lib/rabbitmq/advanced.config" <<EOF
]},
{ack_mode, on_confirm},
{reconnect_delay, 5}
]},
{cega_verification,
[{source,
[{protocol, amqp091},
{uris, ["amqp://${MQ_VHOST:-}"]},
{declarations, [{'queue.declare', [{exclusive, true}]},
{'queue.bind',
[{exchange, <<"lega">>},
{queue, <<>>},
{routing_key, <<"verified">>}
]}
]},
{queue, <<>>},
{prefetch_count, 10}
]},
{destination,
[{protocol, amqp091},
{uris, ["amqp://${MQ_VHOST:-}"]},
{declarations, []},
{publish_properties, [{delivery_mode, 2}]},
{publish_fields, [{exchange, <<"cega">>},
{routing_key, <<"files.verified">>}
]}
]},
{ack_mode, on_confirm},
{reconnect_delay, 5}
]}
]}
]}
Expand Down Expand Up @@ -277,6 +303,13 @@ cat > "/var/lib/rabbitmq/definitions.json" <<EOF
"auto_delete": false,
"arguments": {}
},
{
"name": "files.verified",
"vhost": "${MQ_VHOST:-/}",
"durable": true,
"auto_delete": false,
"arguments": {}
},
{
"name": "files.error",
"vhost": "${MQ_VHOST:-/}",
Expand Down Expand Up @@ -342,6 +375,14 @@ cat > "/var/lib/rabbitmq/definitions.json" <<EOF
"destination": "files.completed",
"routing_key": "files.completed"
},
{
"source": "lega",
"vhost": "${MQ_VHOST:-/}",
"destination_type": "queue",
"arguments": {},
"destination": "files.verified",
"routing_key": "files.verified"
},
{
"source": "lega",
"vhost": "${MQ_VHOST:-/}",
Expand Down

0 comments on commit 5cd5bd0

Please sign in to comment.