Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
Optimize install projects find query (#10253)
Browse files Browse the repository at this point in the history
Co-authored-by: Hanzla Mateen <[email protected]>
  • Loading branch information
HexaField and hanzlamateen authored May 28, 2024
1 parent bd184fa commit 807c9ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/install-projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ async function installAllProjects() {
if (!fs.existsSync(localProjectDirectory)) fs.mkdirSync(localProjectDirectory, { recursive: true })
logger.info('running installAllProjects')

const projects = await app.service(projectPath).find({ paginate: false })
const projects = await app.service(projectPath).find({ paginate: false, assetsOnly: false })
logger.info('found projects %o', projects)
await Promise.all(projects.filter((project) => !project.assetsOnly).map((project) => download(project.name)))
await Promise.all(projects.map((project) => download(project.name)))
await app.service(projectPath).update('', { sourceURL: 'default-project' }, { isInternal: true, isJob: true })
const projectConfig = getProjectConfig('default-project') ?? {}
if (projectConfig.onEvent) await onProjectEvent(app, 'default-project', projectConfig.onEvent, 'onUpdate')
Expand Down

0 comments on commit 807c9ff

Please sign in to comment.