mirror of
https://github.com/whyour/qinglong.git
synced 2026-12-01 09:45:36 +08:00
重启服务时自动压缩db
This commit is contained in:
1 parent
b179649078
commit
c054259806
2 files changed
+11
-2
No files matched your search
@@ -16,11 +16,15 @@ export default class EnvService {
|
||||
});
|
||||
}
|
||||
|
||||
public getDb(): DataStore {
|
||||
return this.envDb;
|
||||
}
|
||||
|
||||
public async create(payloads: Env[]): Promise<Env[]> {
|
||||
const envs = await this.envs();
|
||||
let position = initEnvPosition;
|
||||
if (envs && envs.length > 0 && envs[envs.length - 1].position) {
|
||||
position = envs[envs.length - 1].position;
|
||||
position = envs[envs.length - 1].position as number;
|
||||
}
|
||||
const tabs = payloads.map((x) => {
|
||||
position = position / 2;
|
||||
|
||||
Reference in new issue
Block a user