97 Commits

Author SHA1 Message Date
sgraves 18f5f47321 updated build system
Public/monitarr/pipeline/head This commit looks good
2025-03-04 11:43:50 -06:00
sgraves 93c04d12d0 fix
Public/monitarr/pipeline/head This commit looks good
2025-03-04 10:54:10 -06:00
sgraves 3035427d51 build changes
Public/monitarr/pipeline/head There was a failure building this commit
2025-03-04 10:33:44 -06:00
sgraves 394dae2e59 added dev key 2025-03-03 09:04:01 -06:00
sgraves 12c8006c87 updated build system 2025-03-03 08:24:06 -06:00
sgraves 278a0af716 updated build system 2025-03-03 07:34:46 -06:00
sgraves 9fc3c26b10 updated build system 2025-03-01 18:38:09 -06:00
sgraves 2c969f4396 updated build system 2025-02-28 18:29:34 -06:00
sgraves 44123de8f1 updated build system 2025-02-28 17:42:29 -06:00
sgraves f42cc78ab7 updated build system 2025-02-28 17:34:19 -06:00
sgraves e114f905ad updated build system 2025-02-27 14:54:52 -06:00
sgraves 1566620ab4 updated README.md 2025-02-22 06:15:13 -06:00
sgraves a80cf1f9ae updated README 2025-02-22 06:05:08 -06:00
sgraves 854fb18f41 cleanup 2025-02-22 04:20:51 -06:00
sgraves e2c974a32e fix 2025-02-22 04:15:16 -06:00
sgraves 1824d8db01 added logging 2025-02-22 04:14:43 -06:00
sgraves d3a3f304ee added test server command 2025-02-22 04:08:07 -06:00
sgraves 7041688a64 updated build system 2025-02-22 03:40:45 -06:00
sgraves 334e1fb2e8 cleanup 2025-02-21 09:00:52 -06:00
sgraves c580e59cea fix 2025-02-21 08:57:06 -06:00
sgraves f90070139d cleanup 2025-02-21 08:53:31 -06:00
sgraves 3f5756f01c cleanup database 2025-02-21 08:44:21 -06:00
sgraves 4ae32c7292 error handling 2025-02-20 18:48:41 -06:00
sgraves 37ca295f41 throw error on invalid id name 2025-02-20 18:26:44 -06:00
sgraves ba54e4d02e fix log location 2025-02-20 18:10:13 -06:00
sgraves 797036612a updated build system 2025-02-20 14:46:14 -06:00
sgraves 2e17674182 refactor 2025-02-20 14:28:01 -06:00
sgraves c0e9549b82 updated build system 2025-02-20 12:30:13 -06:00
sgraves bb79480f76 updated build system 2025-02-20 11:55:09 -06:00
sgraves 731400c009 removed unused 2025-02-20 07:05:26 -06:00
sgraves 7a32a11774 changed order 2025-02-20 07:04:42 -06:00
sgraves 6d1da0a9da added logging 2025-02-20 07:03:34 -06:00
sgraves e56927eeb3 fix 2025-02-19 19:43:08 -06:00
sgraves 4b488e8587 added logging 2025-02-19 19:29:53 -06:00
sgraves f44a044429 added log 2025-02-19 19:08:47 -06:00
sgraves 8ac9203f04 fix crash 2025-02-19 18:47:13 -06:00
sgraves c31e7a0995 updated log 2025-02-19 18:38:03 -06:00
sgraves f56ca75e7e refactor 2025-02-19 17:18:33 -06:00
sgraves 005ac16a2d refactor 2025-02-19 17:17:02 -06:00
sgraves b2797e5aef fixes 2025-02-19 17:03:38 -06:00
sgraves 6e9d509442 handle nullptr errors 2025-02-19 16:59:05 -06:00
sgraves 2b72d3150c cleanup 2025-02-19 16:50:56 -06:00
sgraves 8e346670e6 updates 2025-02-19 16:47:32 -06:00
sgraves 488ce4bfcd updated build system 2025-02-19 16:39:40 -06:00
sgraves ff693f907b updated build system 2025-02-19 16:15:47 -06:00
sgraves 6e6bd339ec fix 2025-02-19 16:13:08 -06:00
sgraves 2dc6a30c4e refactor 2025-02-19 14:58:37 -06:00
sgraves 6348999295 updates 2025-02-19 14:37:38 -06:00
sgraves a1abf73bb2 updated copyright 2025-02-19 14:35:11 -06:00
sgraves 4db32a400a added copyright 2025-02-19 14:34:23 -06:00
sgraves fb987af091 refactor 2025-02-19 14:31:06 -06:00
sgraves b79784a939 fix exit code 2025-02-19 14:28:32 -06:00
sgraves d3dce6bdfb fix 2025-02-19 14:28:02 -06:00
sgraves c9080d6033 cleanup 2025-02-19 14:27:04 -06:00
sgraves 53985bd0b0 cleanup 2025-02-19 14:26:52 -06:00
sgraves 7ebba5bafb fix spdlog 2025-02-19 14:26:36 -06:00
sgraves 30bcb28575 use spdlog 2025-02-19 13:51:14 -06:00
sgraves 2e34b4030a cleanup 2025-02-19 13:30:51 -06:00
sgraves cfe240397f don't save on exit 2025-02-19 13:29:19 -06:00
sgraves 25a2f05b21 fix 2025-02-19 13:26:09 -06:00
sgraves 6f3e2f2ad7 fix 2025-02-19 13:25:29 -06:00
sgraves 3c2b113fcd refactor 2025-02-19 13:24:20 -06:00
sgraves 365e83e15d fix 2025-02-19 13:19:26 -06:00
sgraves 292dfaab3f fix 2025-02-19 13:17:12 -06:00
sgraves c52f7e84e6 refactor 2025-02-19 13:16:07 -06:00
sgraves 5e15a927f1 refactor 2025-02-19 13:13:05 -06:00
sgraves 8864889f8a fix 2025-02-19 12:19:16 -06:00
sgraves 6bc1cdcfbc fix 2025-02-19 12:13:15 -06:00
sgraves e8e435c170 create config file if not found 2025-02-19 12:07:38 -06:00
sgraves 8ae450aaac refactor 2025-02-19 12:04:00 -06:00
sgraves 9247c9f239 handle cmdline arg error conditions 2025-02-19 12:01:25 -06:00
sgraves 8830b64632 refactor 2025-02-19 11:57:48 -06:00
sgraves 15472c0357 refactor 2025-02-19 11:52:59 -06:00
sgraves 20e6fd8ffd refactor 2025-02-19 11:52:44 -06:00
sgraves b92b5e2e91 refactor 2025-02-19 11:50:18 -06:00
sgraves 42a9ed9b44 refactor 2025-02-19 10:39:03 -06:00
sgraves 428fcacc18 updated build system 2025-02-19 09:35:47 -06:00
sgraves 6744dbd21c refactor 2025-02-18 19:25:26 -06:00
sgraves d056534b9b cli options 2025-02-18 19:22:42 -06:00
sgraves 9490addc30 display help 2025-02-18 19:18:56 -06:00
sgraves 797076c379 fixes 2025-02-18 19:14:22 -06:00
sgraves dec748851d refactor 2025-02-18 16:13:55 -06:00
sgraves 9c30afe508 error display 2025-02-18 16:12:23 -06:00
sgraves 249d6aa3eb large page size 2025-02-18 16:05:21 -06:00
sgraves a15592eb68 checks 2025-02-18 16:03:51 -06:00
sgraves e5aaf6ad73 check remaining 2025-02-18 16:02:50 -06:00
sgraves 855e3853b6 check status 2025-02-18 16:02:10 -06:00
sgraves 6c4fcf1e2d refactor 2025-02-18 14:54:46 -06:00
sgraves 3cd9b5b29c logging 2025-02-18 14:52:56 -06:00
sgraves e5a7c9ef8a cleanup 2025-02-18 14:47:43 -06:00
sgraves 042cabeee3 logging changes 2025-02-18 14:45:13 -06:00
sgraves 8b06509084 refactor 2025-02-18 14:43:10 -06:00
sgraves f91e826e36 cleanup 2025-02-18 14:39:42 -06:00
sgraves eb4f771e14 logging 2025-02-18 14:38:14 -06:00
sgraves 27b71eb7d6 updated logging 2025-02-18 14:34:51 -06:00
sgraves 474e3c43a7 initial changes 2025-02-18 14:31:57 -06:00
sgraves 7a3028c7fc Initial commit 2025-02-18 14:30:17 -06:00
51 changed files with 86 additions and 162 deletions
-5
View File
@@ -1,5 +0,0 @@
*.tgz filter=lfs diff=lfs merge=lfs -text
*.tar.gz filter=lfs diff=lfs merge=lfs -text
*.tar.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.msi filter=lfs diff=lfs merge=lfs -text
-8
View File
@@ -1,8 +0,0 @@
# Changelog
## v1.1.0-release
### Changes from v1.0.0-release
* Added labels to log entries
* Detect and remove stalled torrent import
+8 -8
View File
@@ -1,14 +1,14 @@
set(BINUTILS_HASH ce2017e059d63e67ddb9240e9d4ec49c2893605035cd60e92ad53177f4377237) set(BINUTILS_HASH b53606f443ac8f01d1d5fc9c39497f2af322d99e14cea5c0b4b124d630379365)
set(CPP_HTTPLIB_HASH 18064587e0cc6a0d5d56d619f4cbbcaba47aa5d84d86013abbd45d95c6653866) set(CPP_HTTPLIB_HASH c9b9e0524666e1cd088f0874c57c1ce7c0eaa8552f9f4e15c755d5201fc8c608)
set(CURL_HASH ccc5ba45d9f5320c70ffb24e5411b66ba55ea1f333bf78be0963ed90a9328699) set(CURL_HASH 6edc063d1ebaf9cf3b3b46e9fef2f3cd8932694989ecd43d005d6e828426d09f)
set(EXPAT_HASH 85372797ff0673a8fc4a6be16466bb5a0ca28c0dcf3c6f7ac1686b4a3ba2aabb) set(EXPAT_HASH 372b18f6527d162fa9658f1c74d22a37429b82d822f5a1e1fc7e00f6045a06a2)
set(GCC_HASH 7d376d445f93126dc545e2c0086d0f647c3094aae081cdb78f42ce2bc25e7293) set(GCC_HASH 7d376d445f93126dc545e2c0086d0f647c3094aae081cdb78f42ce2bc25e7293)
set(GTEST_HASH 78c676fc63881529bf97bf9d45948d905a66833fbfa5318ea2cd7478cb98f399) set(GTEST_HASH 78c676fc63881529bf97bf9d45948d905a66833fbfa5318ea2cd7478cb98f399)
set(ICU_HASH a2c443404f00098e9e90acf29dc318e049d2dc78d9ae5f46efb261934a730ce2) set(ICU_HASH a2c443404f00098e9e90acf29dc318e049d2dc78d9ae5f46efb261934a730ce2)
set(JSON_HASH 4b92eb0c06d10683f7447ce9406cb97cd4b453be18d7279320f7b2f025c10187) set(JSON_HASH 0d8ef5af7f9794e3263480193c491549b2ba6cc74bb018906202ada498a79406)
set(MINGW_HASH cc41898aac4b6e8dd5cffd7331b9d9515b912df4420a3a612b5ea2955bbeed2f) set(MINGW_HASH cc41898aac4b6e8dd5cffd7331b9d9515b912df4420a3a612b5ea2955bbeed2f)
set(OPENSSL_HASH 344d0a79f1a9b08029b0744e2cc401a43f9c90acd1044d09a530b4885a8e9fc0) set(OPENSSL_HASH 002a2d6b30b58bf4bea46c43bdd96365aaf8daa6c428782aa4feee06da197df3)
set(PKG_CONFIG_HASH 6fc69c01688c9458a57eb9a1664c9aba372ccda420a02bf4429fe610e7e7d591) set(PKG_CONFIG_HASH 6fc69c01688c9458a57eb9a1664c9aba372ccda420a02bf4429fe610e7e7d591)
set(ROCKSDB_HASH 3fdc9ca996971c4c039959866382c4a3a6c8ade4abf888f3b2ff77153e07bf28) set(ROCKSDB_HASH fdccab16133c9d927a183c2648bcea8d956fb41eb1df2aacaa73eb0b95e43724)
set(SPDLOG_HASH 7a80896357f3e8e920e85e92633b14ba0f229c506e6f978578bdc35ba09e9a5d) set(SPDLOG_HASH 25c843860f039a1600f232c6eb9e01e6627f7d030a2ae5e232bdd3c9205d26cc)
set(ZLIB_HASH 17e88863f3600672ab49182f217281b6fc4d3c762bde361935e436a95214d05c) set(ZLIB_HASH 17e88863f3600672ab49182f217281b6fc4d3c762bde361935e436a95214d05c)
+13 -13
View File
@@ -1,23 +1,23 @@
set(BINUTILS_VERSION 2.44) set(BINUTILS_VERSION 2.43)
set(BOOST_MAJOR_VERSION 1)
set(BOOST_MINOR_VERSION 87)
set(BOOST_PATCH_VERSION 0)
set(BOOST2_MAJOR_VERSION 1) set(BOOST2_MAJOR_VERSION 1)
set(BOOST2_MINOR_VERSION 76) set(BOOST2_MINOR_VERSION 76)
set(BOOST2_PATCH_VERSION 0) set(BOOST2_PATCH_VERSION 0)
set(BOOST_MAJOR_VERSION 1) set(CPP_HTTPLIB_VERSION 0.19.0)
set(BOOST_MINOR_VERSION 88) set(CURL_VERSION 8.12.1)
set(BOOST_PATCH_VERSION 0) set(CURL2_VERSION 8_12_1)
set(CPP_HTTPLIB_VERSION 0.20.0) set(EXPAT_VERSION 2.6.4)
set(CURL2_VERSION 8_13_0) set(EXPAT2_VERSION 2_6_4)
set(CURL_VERSION 8.13.0)
set(EXPAT2_VERSION 2_7_1)
set(EXPAT_VERSION 2.7.1)
set(GCC_VERSION 14.2.0) set(GCC_VERSION 14.2.0)
set(GTEST_VERSION 1.16.0) set(GTEST_VERSION 1.16.0)
set(ICU_VERSION 76-1) set(ICU_VERSION 76-1)
set(JSON_VERSION 3.12.0) set(JSON_VERSION 3.11.3)
set(MESA_VERSION 23.3.3) set(MESA_VERSION 23.3.3)
set(MINGW_VERSION 12.0.0) set(MINGW_VERSION 12.0.0)
set(OPENSSL_VERSION 3.5.0) set(OPENSSL_VERSION 3.4.1)
set(PKG_CONFIG_VERSION 0.29.2) set(PKG_CONFIG_VERSION 0.29.2)
set(ROCKSDB_VERSION 10.0.1) set(ROCKSDB_VERSION 9.10.0)
set(SPDLOG_VERSION 1.15.2) set(SPDLOG_VERSION 1.15.1)
set(ZLIB_VERSION 1.3.1) set(ZLIB_VERSION 1.3.1)
+1 -1
View File
@@ -8,7 +8,7 @@ PROJECT_DESC="Utility to remove, block and search stalled downloads in lidarr, r
PROJECT_URL="https://git.fifthgrid.com/public/monitarr" PROJECT_URL="https://git.fifthgrid.com/public/monitarr"
PROJECT_MAJOR_VERSION=1 PROJECT_MAJOR_VERSION=1
PROJECT_MINOR_VERSION=1 PROJECT_MINOR_VERSION=0
PROJECT_REVISION_VERSION=0 PROJECT_REVISION_VERSION=0
PROJECT_RELEASE_NUM=0 PROJECT_RELEASE_NUM=0
PROJECT_RELEASE_ITER=release PROJECT_RELEASE_ITER=release
-1
View File
@@ -31,7 +31,6 @@ RUN apk add \
gflags \ gflags \
gflags-dev \ gflags-dev \
git \ git \
git-lfs \
icu-dev \ icu-dev \
icu-libs \ icu-libs \
icu-static \ icu-static \
-1
View File
@@ -31,7 +31,6 @@ RUN apk add \
gflags \ gflags \
gflags-dev \ gflags-dev \
git \ git \
git-lfs \
icu-dev \ icu-dev \
icu-libs \ icu-libs \
icu-static \ icu-static \
+3 -4
View File
@@ -18,7 +18,6 @@ RUN apk add \
gcc \ gcc \
gettext \ gettext \
git \ git \
git-lfs \
gmp \ gmp \
gmp-dev \ gmp-dev \
gperf \ gperf \
@@ -351,9 +350,9 @@ RUN cd /3rd_party/mingw64 && sha256sum -c ./expat-${MY_EXPAT_VERSION}.tar.gz.sha
ARG FONTCONFIG_VERSION ARG FONTCONFIG_VERSION
ENV MY_FONTCONFIG_VERSION=${FONTCONFIG_VERSION} ENV MY_FONTCONFIG_VERSION=${FONTCONFIG_VERSION}
RUN if [ -f "/3rd_party/fontconfig-${MY_FONTCONFIG_VERSION}.tar.xz" ]; then \ RUN if [ -f "/3rd_party/fontconfig-${MY_FONTCONFIG_VERSION}.tar.gz" ]; then \
cd /3rd_party && sha256sum -c ./fontconfig-${MY_FONTCONFIG_VERSION}.tar.xz.sha256 && cd - \ cd /3rd_party && sha256sum -c ./fontconfig-${MY_FONTCONFIG_VERSION}.tar.gz.sha256 && cd - \
&& tar xvJf /3rd_party/fontconfig-${MY_FONTCONFIG_VERSION}.tar.xz \ && tar xvzf /3rd_party/fontconfig-${MY_FONTCONFIG_VERSION}.tar.gz \
&& cd fontconfig-${MY_FONTCONFIG_VERSION} \ && cd fontconfig-${MY_FONTCONFIG_VERSION} \
&& meson setup \ && meson setup \
--cross-file ${MY_TOOLCHAIN_FILE_MESON} \ --cross-file ${MY_TOOLCHAIN_FILE_MESON} \
+1 -2
View File
@@ -40,8 +40,7 @@ auto list_cmd(int argc, char **argv, const app_config &cfg) -> int {
const auto &server = cfg.server_list.at(utils::string::to_uint64(*idx)); const auto &server = cfg.server_list.at(utils::string::to_uint64(*idx));
utils::error::handle_info( utils::error::handle_info(
function_name, function_name, fmt::format("list queue|{}|{}", server.id, server.url));
fmt::format("list queue|sid|{}|url|{}", server.id, server.url));
return list_queue(server); return list_queue(server);
} }
} // namespace monitarr } // namespace monitarr
+26 -36
View File
@@ -40,8 +40,8 @@ monitarr::stop_type stop_requested{false};
void quit_handler(int sig) { void quit_handler(int sig) {
MONITARR_USES_FUNCTION_NAME(); MONITARR_USES_FUNCTION_NAME();
monitarr::utils::error::handle_info( monitarr::utils::error::handle_info(function_name,
function_name, fmt::format("stop requested|signal|{}", sig)); fmt::format("stop requested|{}", sig));
stop_requested = true; stop_requested = true;
monitarr::mutex_lock lock(mtx); monitarr::mutex_lock lock(mtx);
@@ -53,9 +53,8 @@ namespace monitarr {
static void check_server(const server_cfg &server, data_db &state_db) { static void check_server(const server_cfg &server, data_db &state_db) {
MONITARR_USES_FUNCTION_NAME(); MONITARR_USES_FUNCTION_NAME();
utils::error::handle_info( utils::error::handle_info(function_name, fmt::format("checking server|{}|{}",
function_name, server.id, server.url));
fmt::format("checking server|sid|{}|url|{}", server.id, server.url));
auto cli = create_client(server); auto cli = create_client(server);
@@ -70,16 +69,15 @@ static void check_server(const server_cfg &server, data_db &state_db) {
if (not response) { if (not response) {
utils::error::handle_error( utils::error::handle_error(
function_name, function_name,
fmt::format("check server request failed|sid|{}|url|{}|no response", fmt::format("check server request failed|{}|{}|no response",
server.id, server.url)); server.id, server.url));
break; break;
} }
if (response->status != httplib::StatusCode::OK_200) { if (response->status != httplib::StatusCode::OK_200) {
utils::error::handle_error( utils::error::handle_error(
function_name, function_name, fmt::format("check server request failed|{}|{}|{}",
fmt::format("check server request failed|sid|{}|url|{}|status|{}", server.id, server.url, response->status));
server.id, server.url, response->status));
break; break;
} }
@@ -103,29 +101,23 @@ static void check_server(const server_cfg &server, data_db &state_db) {
auto movie_id = record.contains("movieId") auto movie_id = record.contains("movieId")
? record["movieId"].get<std::uint64_t>() ? record["movieId"].get<std::uint64_t>()
: std::uint64_t{0U}; : std::uint64_t{0U};
auto size = record.at("size").get<std::uint64_t>();
auto size_left = record.at("sizeleft").get<std::uint64_t>(); auto size_left = record.at("sizeleft").get<std::uint64_t>();
auto title = record.at("title").get<std::string>(); auto title = record.at("title").get<std::string>();
auto is_downloading = auto is_downloading = utils::string::contains(
utils::string::contains(record.at("status").get<std::string>(), record.at("status").get<std::string>(), "downloading");
"downloading") ||
size == 0U;
auto data = state_db.get(download_id); auto data = state_db.get(download_id);
const auto update_entry = [&download_id, &now, server_id = server.id, const auto update_entry = [&download_id, &now, server_id = server.id,
&size, &size_left, &state_db, &title, &size_left, &state_db, &title,
url = server.url](auto last_size_left) { url = server.url](auto last_size_left) {
if (size != 0U && size_left == 0U) { if (size_left == 0U) {
state_db.remove(download_id); state_db.remove(download_id);
return; return;
} }
utils::error::handle_info( utils::error::handle_info(
function_name, function_name, fmt::format("updating {}|{}|{}|{}|{}", download_id,
fmt::format( title, now, size_left, last_size_left));
"updating "
"id|{}|title|{}|now|{}|size|{}|size_left|{}|last_size_left|{}",
download_id, title, now, size, size_left, last_size_left));
state_db.set(data_entry{ state_db.set(data_entry{
download_id, download_id,
now, now,
@@ -137,12 +129,10 @@ static void check_server(const server_cfg &server, data_db &state_db) {
if (std::chrono::nanoseconds(now - data->last_check) >= if (std::chrono::nanoseconds(now - data->last_check) >=
server.timeout) { server.timeout) {
utils::error::handle_info( utils::error::handle_info(
function_name, fmt::format("processing timeout " function_name,
"id|{}|title|{}|now|{}|size|{}|size_" fmt::format("processing timeout {}|{}|{}|{}|{}", download_id,
"left|{}|last_size_left|{}", title, now, size_left, data->size_left));
download_id, title, now, size, if (size_left == data->size_left) {
size_left, data->size_left));
if (size == 0U || size_left == data->size_left) {
remove_stalled(download_id, title, episode_id, movie_id, server, remove_stalled(download_id, title, episode_id, movie_id, server,
&state_db); &state_db);
} else if (size_left == 0U || not is_downloading) { } else if (size_left == 0U || not is_downloading) {
@@ -150,10 +140,10 @@ static void check_server(const server_cfg &server, data_db &state_db) {
} else { } else {
update_entry(data->size_left); update_entry(data->size_left);
} }
} else if ((size != 0U && size_left == 0U) || not is_downloading) { } else if (size_left == 0U || not is_downloading) {
state_db.remove(download_id); state_db.remove(download_id);
} }
} else if (is_downloading && (size == 0U || size_left > 0U)) { } else if (is_downloading && size_left > 0U) {
update_entry(0U); update_entry(0U);
} }
} }
@@ -178,15 +168,15 @@ static void cleanup_entries(const server_cfg &server, data_db &state_db) {
} }
utils::error::handle_warn( utils::error::handle_warn(
function_name, fmt::format("download not found|sid|{}|url|{}|id|{}", function_name, fmt::format("download not found|{}|{}|{}", server.id,
server.id, server.url, entry.download_id)); server.url, entry.download_id));
if (not is_not_found) { if (not is_not_found) {
continue; continue;
} }
utils::error::handle_warn( utils::error::handle_warn(
function_name, fmt::format("removing download|sid|{}|url|{}|id|{}", function_name, fmt::format("removing download|{}|{}|{}", server.id,
server.id, server.url, entry.download_id)); server.url, entry.download_id));
state_db.remove(entry.download_id); state_db.remove(entry.download_id);
} }
} }
@@ -232,8 +222,8 @@ auto run_cmd(const app_config &cfg, std::string_view log_dir) -> int {
} }
utils::error::handle_info( utils::error::handle_info(
function_name, fmt::format("waiting for next check|interval|{}", function_name,
cfg.check_interval)); fmt::format("waiting for next check|{}", cfg.check_interval));
notify.wait_for(lock, cfg.check_interval); notify.wait_for(lock, cfg.check_interval);
} }
@@ -248,7 +238,7 @@ auto run_cmd(const app_config &cfg, std::string_view log_dir) -> int {
} }
utils::error::handle_info(function_name, utils::error::handle_info(function_name,
fmt::format("exiting application|ret|{}", ret)); fmt::format("exiting application|{}", ret));
return ret; return ret;
} }
-1
View File
@@ -15,7 +15,6 @@ if [ "${PROJECT_IS_MINGW}" == "1" ] && [ "${PROJECT_STATIC_LINK}" == "OFF" ]; th
/mingw64/bin/libstdc++-6.dll /mingw64/bin/libstdc++-6.dll
/mingw64/bin/libwinpthread-1.dll /mingw64/bin/libwinpthread-1.dll
/mingw64/bin/libzlib1.dll /mingw64/bin/libzlib1.dll
/mingw64/bin/libzstd.dll
/mingw64/bin/zlib1.dll /mingw64/bin/zlib1.dll
) )
+11 -11
View File
@@ -1,27 +1,27 @@
#!/bin/bash #!/bin/bash
declare -A PROJECT_VERSIONS declare -A PROJECT_VERSIONS
PROJECT_VERSIONS[BINUTILS]="2.44" PROJECT_VERSIONS[BINUTILS]="2.43"
PROJECT_VERSIONS[BOOST2_MAJOR]="1" PROJECT_VERSIONS[BOOST2_MAJOR]="1"
PROJECT_VERSIONS[BOOST2_MINOR]="76" PROJECT_VERSIONS[BOOST2_MINOR]="76"
PROJECT_VERSIONS[BOOST2_PATCH]="0" PROJECT_VERSIONS[BOOST2_PATCH]="0"
PROJECT_VERSIONS[BOOST_MAJOR]="1" PROJECT_VERSIONS[BOOST_MAJOR]="1"
PROJECT_VERSIONS[BOOST_MINOR]="88" PROJECT_VERSIONS[BOOST_MINOR]="87"
PROJECT_VERSIONS[BOOST_PATCH]="0" PROJECT_VERSIONS[BOOST_PATCH]="0"
PROJECT_VERSIONS[CPP_HTTPLIB]="0.20.0" PROJECT_VERSIONS[CPP_HTTPLIB]="0.19.0"
PROJECT_VERSIONS[CURL]="8.13.0" PROJECT_VERSIONS[CURL]="8.12.1"
PROJECT_VERSIONS[CURL2]="8_13_0" PROJECT_VERSIONS[CURL2]="8_12_1"
PROJECT_VERSIONS[EXPAT]="2.7.1" PROJECT_VERSIONS[EXPAT]="2.6.4"
PROJECT_VERSIONS[EXPAT2]="2_7_1" PROJECT_VERSIONS[EXPAT2]="2_6_4"
PROJECT_VERSIONS[GCC]="14.2.0" PROJECT_VERSIONS[GCC]="14.2.0"
PROJECT_VERSIONS[GTEST]="1.16.0" PROJECT_VERSIONS[GTEST]="1.16.0"
PROJECT_VERSIONS[ICU]="76-1" PROJECT_VERSIONS[ICU]="76-1"
PROJECT_VERSIONS[JSON]="3.12.0" PROJECT_VERSIONS[JSON]="3.11.3"
PROJECT_VERSIONS[MESA]="23.3.3" PROJECT_VERSIONS[MESA]="23.3.3"
PROJECT_VERSIONS[MINGW]="12.0.0" PROJECT_VERSIONS[MINGW]="12.0.0"
PROJECT_VERSIONS[OPENSSL]="3.5.0" PROJECT_VERSIONS[OPENSSL]="3.4.1"
PROJECT_VERSIONS[PKG_CONFIG]="0.29.2" PROJECT_VERSIONS[PKG_CONFIG]="0.29.2"
PROJECT_VERSIONS[ROCKSDB]="10.0.1" PROJECT_VERSIONS[ROCKSDB]="9.10.0"
PROJECT_VERSIONS[SPDLOG]="1.15.2" PROJECT_VERSIONS[SPDLOG]="1.15.1"
PROJECT_VERSIONS[ZLIB]="1.3.1" PROJECT_VERSIONS[ZLIB]="1.3.1"
export PROJECT_VERSIONS export PROJECT_VERSIONS
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
c9b9e0524666e1cd088f0874c57c1ce7c0eaa8552f9f4e15c755d5201fc8c608 *cpp-httplib-0.19.0.tar.gz
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
18064587e0cc6a0d5d56d619f4cbbcaba47aa5d84d86013abbd45d95c6653866 cpp-httplib-0.20.0.tar.gz
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
6edc063d1ebaf9cf3b3b46e9fef2f3cd8932694989ecd43d005d6e828426d09f *curl-8.12.1.tar.gz
BIN
View File
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
ccc5ba45d9f5320c70ffb24e5411b66ba55ea1f333bf78be0963ed90a9328699 curl-8.13.0.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
0d8ef5af7f9794e3263480193c491549b2ba6cc74bb018906202ada498a79406 json-3.11.3.tar.gz
BIN
View File
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
4b92eb0c06d10683f7447ce9406cb97cd4b453be18d7279320f7b2f025c10187 json-3.12.0.tar.gz
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
b53606f443ac8f01d1d5fc9c39497f2af322d99e14cea5c0b4b124d630379365 binutils-2.43.tar.xz
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
ce2017e059d63e67ddb9240e9d4ec49c2893605035cd60e92ad53177f4377237 binutils-2.44.tar.xz
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
372b18f6527d162fa9658f1c74d22a37429b82d822f5a1e1fc7e00f6045a06a2 *expat-2.6.4.tar.gz
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
85372797ff0673a8fc4a6be16466bb5a0ca28c0dcf3c6f7ac1686b4a3ba2aabb expat-2.7.1.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
002a2d6b30b58bf4bea46c43bdd96365aaf8daa6c428782aa4feee06da197df3 *openssl-3.4.1.tar.gz
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
344d0a79f1a9b08029b0744e2cc401a43f9c90acd1044d09a530b4885a8e9fc0 openssl-3.5.0.tar.gz
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
3fdc9ca996971c4c039959866382c4a3a6c8ade4abf888f3b2ff77153e07bf28 rocksdb-10.0.1.tar.gz
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
fdccab16133c9d927a183c2648bcea8d956fb41eb1df2aacaa73eb0b95e43724 *rocksdb-9.10.0.tar.gz
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
25c843860f039a1600f232c6eb9e01e6627f7d030a2ae5e232bdd3c9205d26cc *spdlog-1.15.1.tar.gz
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
7a80896357f3e8e920e85e92633b14ba0f229c506e6f978578bdc35ba09e9a5d spdlog-1.15.2.tar.gz
+15 -39
View File
@@ -25,8 +25,8 @@
#include "utils/string.hpp" #include "utils/string.hpp"
namespace monitarr::utils { namespace monitarr::utils {
auto compare_version_strings(std::string version1, std::string version2) auto compare_version_strings(std::string version1,
-> std::int32_t { std::string version2) -> std::int32_t {
if (utils::string::contains(version1, "-")) { if (utils::string::contains(version1, "-")) {
version1 = utils::string::split(version1, '-', true)[0U]; version1 = utils::string::split(version1, '-', true)[0U];
@@ -131,47 +131,23 @@ auto get_next_available_port(std::uint16_t first_port,
using ip::tcp; using ip::tcp;
boost::system::error_code error_code{}; boost::system::error_code error_code{};
while (first_port != 0U) {
std::uint32_t check_port{first_port}; io_context ctx{};
while (check_port <= 65535U) { tcp::acceptor acceptor(ctx);
{ acceptor.open(tcp::v4(), error_code) ||
io_context ctx{}; acceptor.bind({tcp::v4(), first_port}, error_code);
tcp::socket socket(ctx); if (not error_code) {
socket.connect( break;
{
tcp::endpoint(ip::address_v4::loopback(),
static_cast<std::uint16_t>(check_port)),
},
error_code);
if (not error_code) {
++check_port;
continue;
}
} }
{ ++first_port;
io_context ctx{};
tcp::acceptor acceptor(ctx);
acceptor.open(tcp::v4(), error_code);
if (error_code) {
++check_port;
continue;
}
acceptor.set_option(boost::asio::ip::tcp::acceptor::linger(true, 0));
acceptor.bind({tcp::v4(), static_cast<std::uint16_t>(check_port)},
error_code);
if (error_code) {
++check_port;
continue;
}
}
available_port = static_cast<std::uint16_t>(check_port);
return true;
} }
return false; if (not error_code) {
available_port = first_port;
}
return not error_code;
} }
#endif // defined(PROJECT_ENABLE_BOOST) #endif // defined(PROJECT_ENABLE_BOOST)