Remove the timeout

Summary: We were not using the timeout at all, so we decided to remove it. Also, the current value is pretty high, so it should never fail unless there's something really bad.

Reviewed By: jeanlauliac

Differential Revision: D5640839

fbshipit-source-id: 3eaa567a6828902376fe5df9fe3f4e96b83a23bd
This commit is contained in:
Miguel Jimenez Esun 2017-08-23 07:45:40 -07:00 committed by Facebook Github Bot
parent 87aa1cc166
commit b2331471d5
4 changed files with 1 additions and 7 deletions

View File

@ -145,7 +145,6 @@ type Options = {|
+sourceExts: Array<string>,
+transformCache: TransformCache,
+transformModulePath: string,
+transformTimeoutInterval: ?number,
+watch: boolean,
+workerPath: ?string,
|};

View File

@ -172,8 +172,7 @@ class Transformer {
if (error.type === 'TimeoutError') {
const timeoutErr = new Error(
`TimeoutError: transforming ${fileName} took longer than ` +
`${TRANSFORM_TIMEOUT_INTERVAL / 1000} seconds.\n` +
"You can adjust timeout via the 'transformTimeoutInterval' option",
`${TRANSFORM_TIMEOUT_INTERVAL / 1000} seconds.\n`,
);
/* $FlowFixMe: monkey-patch Error */
timeoutErr.type = 'TimeoutError';

View File

@ -92,7 +92,6 @@ export type Options = {|
+sourceExts: ?Array<string>,
+transformCache: TransformCache,
+transformModulePath: string,
transformTimeoutInterval?: number,
watch?: boolean,
workerPath: ?string,
|};
@ -161,7 +160,6 @@ class Server {
+sourceExts: Array<string>,
+transformCache: TransformCache,
+transformModulePath: string,
transformTimeoutInterval: ?number,
watch: boolean,
workerPath: ?string,
};
@ -216,7 +214,6 @@ class Server {
sourceExts: options.sourceExts || defaults.sourceExts,
transformCache: options.transformCache,
transformModulePath: options.transformModulePath,
transformTimeoutInterval: options.transformTimeoutInterval,
watch: options.watch || false,
workerPath: options.workerPath,
};

View File

@ -154,7 +154,6 @@ function toServerOptions(options: Options): ServerOptions {
sourceExts: options.sourceExts,
transformCache: options.transformCache || TransformCaching.useTempDir(),
transformModulePath: options.transformModulePath,
transformTimeoutInterval: options.transformTimeoutInterval,
watch: typeof options.watch === 'boolean' ? options.watch : !!options.nonPersistent,
workerPath: options.workerPath,
};