File tree Expand file tree Collapse file tree 2 files changed +7
-11
lines changed
libraries/nestjs-libraries/src Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Original file line number Diff line number Diff line change 11import { Injectable } from '@nestjs/common' ;
22
3- let limit : any ;
4-
5- ( async ( ) => {
6- const pLimit = await import ( 'p-limit' ) ;
7- limit = pLimit . default ( 10 ) ;
8- } ) ( ) ;
3+ import pLimit from 'p-limit' ;
4+ const limit = pLimit ( 10 ) ;
95
106@Injectable ( )
117export class FalService {
Original file line number Diff line number Diff line change @@ -9,15 +9,15 @@ import { chunk } from 'lodash';
99import Transloadit from 'transloadit' ;
1010import { UploadFactory } from '@gitroom/nestjs-libraries/upload/upload.factory' ;
1111import { Readable } from 'stream' ;
12- import { parseBuffer } from 'music-metadata' ;
1312import { stringifySync } from 'subtitle' ;
14- import { FalService } from '@gitroom/nestjs-libraries/openai/fal.service' ;
1513
16- let limit : any ;
14+ import pLimit from 'p-limit' ;
15+ import { FalService } from '@gitroom/nestjs-libraries/openai/fal.service' ;
16+ const limit = pLimit ( 2 ) ;
1717
18+ let parseBuffer : any ;
1819( async ( ) => {
19- const pLimit = await import ( 'p-limit' ) ;
20- limit = pLimit . default ( 2 ) ;
20+ parseBuffer = ( await import ( 'music-metadata' ) ) . parseBuffer ;
2121} ) ( ) ;
2222
2323const transloadit = new Transloadit ( {
You can’t perform that action at this time.
0 commit comments