重构协程

This commit is contained in:
2026-06-25 11:17:52 +08:00
parent 2aad10ccf4
commit f0510f5438
11 changed files with 370 additions and 386 deletions
@@ -593,7 +593,7 @@ void Data_Source_Config::server(Global* g) {
ds->enable = false;
ds->close();
ds->from_json(&params);
wake_data_feed_thread();
g->save();
g->mode_acs.source_feed_relation_config.set_need_refresh();
});
@@ -610,7 +610,7 @@ void Data_Source_Config::server(Global* g) {
(void)enable;
HTTP_REQUIRE_TRUE(map.insert(index, ds), "index")
wake_data_feed_thread();
//std::cout << params.to_json_string() << std::endl;
g->mode_acs.source_feed_relation_config.set_need_refresh();
Config::save();
@@ -625,7 +625,7 @@ void Data_Source_Config::server(Global* g) {
ds->close();
HTTP_REQUIRE_TRUE(map.remove(index), "index")
wake_data_feed_thread();
g->save();
res->setBody(warp(to_json()).to_json_string());
g->mode_acs.source_feed_relation_config.set_need_refresh();