Better singleton names

This commit is contained in:
2024-02-23 13:24:03 -03:00
parent 810bf6b830
commit b27e6cb2ec
4 changed files with 14 additions and 14 deletions

View File

@@ -35,13 +35,13 @@ Config loadConfig() {
}
void initRequestPool(Config cfg) {
Rp = new RequestPool();
Rp.startBackground();
RP = new RequestPool();
RP.startBackground();
}
void initDatabase(Config cfg) {
Db = new DB(DBSettings.fromJson(cfg.v["db"]));
Db.connect();
DB = new Database(DBSettings.fromJson(cfg.v["db"]));
DB.connect();
}
void main() {
@@ -50,8 +50,8 @@ void main() {
commonInit();
scope (exit) {
Db.close();
Rp.stop();
DB.close();
RP.stop();
}
ASObject actor = apResolveRemoteUsername("@marisa@ak.gensokyo.shop");
@@ -70,7 +70,7 @@ void main() {
// headers["Accept"] = "application/activity+json";
// }
// Response rs = Rp.request(followers, true);
// Response rs = RP.request(followers, true);
// infoF!"followers: %s"(rs.responseBody);
}
@@ -105,11 +105,11 @@ void main() {
// }
// }
//
// Db = new DB(dbSettings);
// Db.connect();
// DB = new DB(dbSettings);
// DB.connect();
//
// scope (exit)
// Db.close();
// DB.close();
//
// return 0;
//}