Skip to content

Commit

Permalink
Enhancements
Browse files Browse the repository at this point in the history
Refresh cron schedule after loading TOML preferences (tindy2013#629).
Keep line order of Plugin section in Loon configs.
  • Loading branch information
tindy2013 authored and kadaliao committed Oct 16, 2023
1 parent 78def78 commit 05c54a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/generator/config/subexport.cpp
Expand Up @@ -1768,6 +1768,7 @@ std::string proxyToLoon(std::vector<Proxy> &nodes, const std::string &base_conf,
string_array remarks_list;

ini.store_any_line = true;
ini.add_direct_save_section("Plugin");
if(ini.parse(base_conf) != INIREADER_EXCEPTION_NONE && !ext.nodelist)
{
writeLog(0, "Loon base loader failed with error: " + ini.get_last_error(), LOG_LEVEL_ERROR);
Expand Down
1 change: 1 addition & 0 deletions src/handler/settings.cpp
Expand Up @@ -718,6 +718,7 @@ void readTOMLConf(toml::value &root)
auto tasks = toml::find_or<std::vector<toml::value>>(root, "tasks", {});
importItems(tasks, "tasks", false);
global.cronTasks = toml::get<CronTaskConfigs>(toml::value(tasks));
refresh_schedule();

const auto &section_server = toml::find(root, "server");

Expand Down

0 comments on commit 05c54a5

Please sign in to comment.