Better singleton names
This commit is contained in:
@@ -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;
|
||||
//}
|
||||
|
||||
Reference in New Issue
Block a user