This repository was archived by the owner on Nov 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed
Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -54,9 +54,9 @@ export class ProxiedApp {
5454 let options ;
5555
5656 // Pre events need to be fast as they block the user
57- if ( method . startsWith ( 'checkPre' ) || method . startsWith ( 'executePre' ) ) {
58- options = { timeout : 1000 } ;
59- }
57+ // if (method.startsWith('checkPre') || method.startsWith('executePre')) {
58+ // options = { timeout: 1000 };
59+ // }
6060
6161 try {
6262 return await this . appRuntime . sendRequest ( { method : `app:${ method } ` , params : args } , options ) ;
Original file line number Diff line number Diff line change @@ -53,6 +53,18 @@ const COMMAND_PONG = '_zPONG';
5353
5454export const JSONRPC_METHOD_NOT_FOUND = - 32601 ;
5555
56+ export function getRuntimeTimeout ( ) {
57+ const defaultTimeout = 30000 ;
58+ const envValue = isFinite ( process . env . APPS_ENGINE_RUNTIME_TIMEOUT as any ) ? Number ( process . env . APPS_ENGINE_RUNTIME_TIMEOUT ) : defaultTimeout ;
59+
60+ if ( envValue < 0 ) {
61+ console . log ( 'Environment variable APPS_ENGINE_RUNTIME_TIMEOUT has a negative value, ignoring...' ) ;
62+ return defaultTimeout ;
63+ }
64+
65+ return envValue ;
66+ }
67+
5668export function isValidOrigin ( accessor : string ) : accessor is typeof ALLOWED_ACCESSOR_METHODS [ number ] {
5769 return ALLOWED_ACCESSOR_METHODS . includes ( accessor as any ) ;
5870}
@@ -88,7 +100,7 @@ export class DenoRuntimeSubprocessController extends EventEmitter {
88100 private readonly debug : debug . Debugger ;
89101
90102 private readonly options = {
91- timeout : 10000 ,
103+ timeout : getRuntimeTimeout ( ) ,
92104 } ;
93105
94106 private readonly accessors : AppAccessorManager ;
You can’t perform that action at this time.
0 commit comments