Skip to content

Commit

Permalink
Removed rabbitmq-name from AMSlib required fields (#99)
Browse files Browse the repository at this point in the history
Signed-off-by: Loic Pottier <[email protected]>
  • Loading branch information
lpottier committed Feb 28, 2025
1 parent 27db0eb commit 4d8e63b
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 12 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,6 @@ jobs:
\"db\": {
\"dbType\": \"rmq\",
\"rmq_config\": {
\"rabbitmq-name\": \"rabbit\",
\"rabbitmq-user\": \"${RABBITMQ_USER}\",
\"rabbitmq-password\": \"${RABBITMQ_PASS}\",
\"service-port\": ${RABBITMQ_PORT},
Expand Down
2 changes: 0 additions & 2 deletions src/AMSlib/AMS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,6 @@ class AMSWrap
auto rmq_entry = entry["rmq_config"];
int port = getEntry<int>(rmq_entry, "service-port");
std::string host = getEntry<std::string>(rmq_entry, "service-host");
std::string rmq_name = getEntry<std::string>(rmq_entry, "rabbitmq-name");
std::string rmq_pass =
getEntry<std::string>(rmq_entry, "rabbitmq-password");
std::string rmq_user = getEntry<std::string>(rmq_entry, "rabbitmq-user");
Expand Down Expand Up @@ -405,7 +404,6 @@ class AMSWrap
auto &DB = ams::db::DBManager::getInstance();
DB.instantiate_rmq_db(port,
host,
rmq_name,
rmq_pass,
rmq_user,
rmq_vhost,
Expand Down
8 changes: 2 additions & 6 deletions src/AMSlib/wf/basedb.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1604,7 +1604,6 @@ class RMQInterface
/**
* @brief Connect to a RabbitMQ server
* @param[in] rmq_name The name of the RabbitMQ server
* @param[in] rmq_name The name of the RabbitMQ server
* @param[in] rmq_password The password
* @param[in] rmq_user Username
* @param[in] rmq_vhost Virtual host (by default RabbitMQ vhost = '/')
Expand All @@ -1616,8 +1615,7 @@ class RMQInterface
* @param[in] routing_key Routing key for incoming messages (must match what the AMS Python side is using)
* @return True, True if connection succeeded for both publisher/consumer
*/
std::pair<bool, bool> connect(std::string rmq_name,
std::string rmq_password,
std::pair<bool, bool> connect(std::string rmq_password,
std::string rmq_user,
std::string rmq_vhost,
int service_port,
Expand Down Expand Up @@ -2076,7 +2074,6 @@ class DBManager

void instantiate_rmq_db(int port,
std::string& host,
std::string& rmq_name,
std::string& rmq_pass,
std::string& rmq_user,
std::string& rmq_vhost,
Expand All @@ -2096,8 +2093,7 @@ class DBManager
dbType = AMSDBType::AMS_RMQ;
updateSurrogate = update_surrogate;
#ifdef __ENABLE_RMQ__
rmq_interface.connect(rmq_name,
rmq_pass,
rmq_interface.connect(rmq_pass,
rmq_user,
rmq_vhost,
port,
Expand Down
3 changes: 1 addition & 2 deletions src/AMSlib/wf/rmqdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -927,8 +927,7 @@ bool RMQPublisher::close(unsigned ms, int repeat)
* RMQInterface
*/

std::pair<bool, bool> RMQInterface::connect(std::string rmq_name,
std::string rmq_password,
std::pair<bool, bool> RMQInterface::connect(std::string rmq_password,
std::string rmq_user,
std::string rmq_vhost,
int service_port,
Expand Down
1 change: 0 additions & 1 deletion tests/AMSlib/json_configs/rmq.json.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"service-port": 0,
"service-host": "",
"rabbitmq-erlang-cookie": "",
"rabbitmq-name": "",
"rabbitmq-password": "",
"rabbitmq-user": "",
"rabbitmq-vhost": "",
Expand Down

0 comments on commit 4d8e63b

Please sign in to comment.