mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
fix
This commit is contained in:
1 parent
3dd4c1c994
commit
147637d539
2 files changed
+4
-4
No files matched your search
@@ -437,7 +437,7 @@ async function userfileUsage(src: Db, report: Function) {
|
||||
}
|
||||
}
|
||||
|
||||
async function task(name: string, src: Db, report: Function) {
|
||||
async function task(name: any, src: Db, report: Function) {
|
||||
const count = await cursor[name](src).count();
|
||||
await report({ progress: 1, message: `${name}: ${count}` });
|
||||
const total = Math.floor(count / 50);
|
||||
@@ -534,12 +534,12 @@ export async function run({
|
||||
);
|
||||
await report({ progress: 1, message: 'Collection:system done.' });
|
||||
if (!await dst.collection('system').findOne({ _id: 'migrateVijosFs' })) {
|
||||
const f = ['fs.files', 'fs.chunks'];
|
||||
const f = ['fs.files', 'fs.chunks'] as any;
|
||||
for (const i of f) {
|
||||
await dst.collection(i).deleteMany({});
|
||||
await task(i, src, report);
|
||||
}
|
||||
await dst.collection('system').insertOne({ _id: 'migrateVijosFs', value: true });
|
||||
await dst.collection('system').insertOne({ _id: 'migrateVijosFs', value: 1 });
|
||||
}
|
||||
await dst.collection('user').deleteMany({ _id: { $nin: [0, 1] } });
|
||||
await dst.collection('message').deleteMany({});
|
||||
|
||||
Reference in new issue
Block a user