Skip to content

Commit

Permalink
🚨 back: fixing linter
Browse files Browse the repository at this point in the history
  • Loading branch information
ericlinagora committed Oct 28, 2024
1 parent be2a02b commit c8a54a1
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions tdrive/backend/node/src/cli/cmds/dev_cmds/seed_db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const createTree = async (
context: any,
client: mongo.MongoClient,
) => {
const documentRepo = await gr.services.documents.documents.repository;
// Create an array to hold promises
const createFolderPromises = [];

Expand Down Expand Up @@ -101,8 +100,7 @@ const command: yargs.CommandModule<unknown, CLIArgs> = {
const platform = await tdrive.run(services);
await gr.doInit(platform);

let client: mongo.MongoClient;
client = (await gr.database.getConnector()).getClient();
const client = (await gr.database.getConnector()).getClient();

// Manage the default company
const companies = await gr.services.companies.getCompanies();
Expand Down Expand Up @@ -153,10 +151,8 @@ const command: yargs.CommandModule<unknown, CLIArgs> = {
}
console.log("✅ Users created");

let updateBegin = Date.now();
let createTreePromises = [];
const updateBegin = Date.now();
for (const user of allUsers) {
// console.log progress percentage
const context = { company, user };
const parentDrive = `user_${user.id}`;
const folderData = await getDefaultDriveItem(
Expand All @@ -171,7 +167,6 @@ const command: yargs.CommandModule<unknown, CLIArgs> = {
await createTree(folderTreeDepth, folderData, parentDrive, context, client);
console.log(`✅ User ${user.id} folder tree created`);
}
// await Promise.all(createTreePromises);
console.log("✅ Finished execution, took: ", (Date.now() - updateBegin) / 1000, "s");
},
};
Expand Down

0 comments on commit c8a54a1

Please sign in to comment.