Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Refactor, stage 2 #113

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

SwooshyCueb
Copy link
Member

Creating a draft PR now since I'm switching gears for a bit.

This is the PR for stage 2 of the refactor started by #105. This stage of the refactor will introduce a dedicated thread for the AMQP message sender and the ability to handle multiple AMQP endpoints.

Copy link
Contributor

@alanking alanking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lookin real nice so far

Comment on lines +29 to +35
#ifdef __cpp_lib_filesystem
#include <filesystem>
namespace fs = std::filesystem;
#else
#include <boost/filesystem.hpp>
namespace fs = boost::filesystem;
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious: Is this feature check for purposes of portability?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay. It made me wonder to what extent we wanted to do things like this. For instance, if this is to support older compilers, do we need to do something similar for, i.e. string_view (>=C++17)? I don't have a problem with this one, was just wondering where we're drawing this particular line, and/or if I missed the point. :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's less about the compiler and more about the stdlib. If you think it's unlikely that someone would compile against a stdlib that would have string_view and not std::filesystem I can remove this

{
public:
amqp_endpoint(
const std::string_view& _scheme,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason these std::string_views are refs?


namespace irods::plugin::rule_engine::audit_amqp
{
namespace
{
BOOST_FORCEINLINE std::string build_amqp_url(
const std::string_view& _scheme,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be using refs with std::string_view?

{"rule_engine_plugin", rule_engine_name},
{"instance_name", _instance_name},
{"log_message", "Ignoring amqp_location and amqp_topic in favor of amqp_endpoints. These "
"settings have been deprecated and should be removed from the plugin ."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the '.' at the end of this line of text intentional?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants