martinzink commented on a change in pull request #1225:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1225#discussion_r769573941
##########
File path: extensions/rocksdb-repos/ProvenanceRepository.h
##########
@@ -38,8 +38,8 @@ namespace provenance {
#define PROVENANCE_DIRECTORY "./provenance_repository"
#define MAX_PROVENANCE_STORAGE_SIZE (10*1024*1024) // 10M
-#define MAX_PROVENANCE_ENTRY_LIFE_TIME (60000) // 1 minute
-#define PROVENANCE_PURGE_PERIOD (2500) // 2500 msec
+constexpr std::chrono::milliseconds MAX_PROVENANCE_ENTRY_LIFE_TIME =
std::chrono::minutes(1);
+constexpr std::chrono::milliseconds PROVENANCE_PURGE_PERIOD =
std::chrono::milliseconds(2500);
Review comment:
good idea, changed them to auto in
https://github.com/apache/nifi-minifi-cpp/pull/1225/commits/78f8658fde802c73a5965dd734a544acbc37dca3,
I've left out the using namespace std::literals; because this is a header
##########
File path: extensions/rocksdb-repos/FlowFileRepository.h
##########
@@ -51,9 +51,9 @@ namespace repository {
#define FLOWFILE_CHECKPOINT_DIRECTORY "./flowfile_checkpoint"
#endif
#define MAX_FLOWFILE_REPOSITORY_STORAGE_SIZE (10*1024*1024) // 10M
-#define MAX_FLOWFILE_REPOSITORY_ENTRY_LIFE_TIME (600000) // 10 minute
-#define FLOWFILE_REPOSITORY_PURGE_PERIOD (2000) // 2000 msec
-#define FLOWFILE_REPOSITORY_RETRY_INTERVAL_INCREMENTS (500) // msec
+constexpr std::chrono::milliseconds MAX_FLOWFILE_REPOSITORY_ENTRY_LIFE_TIME =
std::chrono::minutes(10);
+constexpr std::chrono::milliseconds FLOWFILE_REPOSITORY_PURGE_PERIOD =
std::chrono::seconds(2);
+constexpr std::chrono::milliseconds
FLOWFILE_REPOSITORY_RETRY_INTERVAL_INCREMENTS = std::chrono::milliseconds(500);
Review comment:
good idea, changed them to auto in
https://github.com/apache/nifi-minifi-cpp/pull/1225/commits/78f8658fde802c73a5965dd734a544acbc37dca3,
I've left out the using namespace std::literals; because this is a header
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]