You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			13 lines
		
	
	
		
			528 B
		
	
	
	
		
			TypeScript
		
	
			
		
		
	
	
			13 lines
		
	
	
		
			528 B
		
	
	
	
		
			TypeScript
		
	
| import { WorkerInterface } from '../worker_interface';
 | |
| import { join } from 'path';
 | |
| 
 | |
| let utilWorkerInterface: WorkerInterface | undefined;
 | |
| 
 | |
| export const callUtilsWorker = async (fnName: string, ...args: any): Promise<any> => {
 | |
|   if (!utilWorkerInterface) {
 | |
|     const utilWorkerPath = join('./', 'ts', 'webworker', 'workers', 'util.worker.js'); //app.getAppPath()
 | |
|     utilWorkerInterface = new WorkerInterface(utilWorkerPath, 3 * 60 * 1000); //{ type: 'module' }
 | |
|   }
 | |
|   return utilWorkerInterface?.callWorker(fnName, ...args);
 | |
| };
 |