mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
verify-data-integrity can now start at a specified project
This commit is contained in:
parent
7dfe34b1c2
commit
8bdc6bb3ae
@ -55,6 +55,7 @@ async function main() {
|
||||
console.log();
|
||||
console.log();
|
||||
|
||||
const startAt = Math.max(0, +(process.argv[2] || "1") - 1);
|
||||
|
||||
const projects = await prismaClient.project.findMany({
|
||||
select: {
|
||||
@ -66,8 +67,11 @@ async function main() {
|
||||
},
|
||||
});
|
||||
console.log(`Found ${projects.length} projects, iterating over them.`);
|
||||
if (startAt !== 0) {
|
||||
console.log(`Starting at project ${startAt}.`);
|
||||
}
|
||||
|
||||
for (let i = 0; i < projects.length; i++) {
|
||||
for (let i = startAt; i < projects.length; i++) {
|
||||
const projectId = projects[i].id;
|
||||
await recurse(`[project ${i + 1}/${projects.length}] ${projectId} ${projects[i].displayName}`, async (recurse) => {
|
||||
const [currentProject, users] = await Promise.all([
|
||||
|
||||
Loading…
Reference in New Issue
Block a user