You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The number of new NodeJS processes created to retry an invocation.
1328
+
The number of NodeJS processes created to retry an invocation.
1329
1329
```csharp
1330
1330
publicintNumProcessRetries { get; set; }
1331
1331
```
1332
1332
###### Remarks
1333
1333
A NodeJS process retries invocations `OutOfProcessNodeJSServiceOptions.NumRetries` times. Once a process's retries are exhausted,
1334
-
if any process retries remain, the library creates a new process that then retries invocations `OutOfProcessNodeJSServiceOptions.NumRetries` times.
1334
+
if any retry-processes remain, the library creates a new process and retries invocations `OutOfProcessNodeJSServiceOptions.NumRetries` times.
1335
1335
1336
1336
For example, consider the situation where `OutOfProcessNodeJSServiceOptions.NumRetries` and this value are both 1. The existing process first attempts the invocation.
1337
1337
If it fails, it retries the invocation once. If it fails again, the library creates a new process that retries the invocation once. In total, the library
1338
-
attempt the invocation 3 times.
1338
+
attempts the invocation 3 times.
1339
1339
1340
1340
If this value is negative, the library creates new NodeJS processes indefinitely.
1341
1341
1342
+
If this value is larger than 0 and `OutOfProcessNodeJSServiceOptions.NumRetries` is 0, the invocation is retried once in each new process.
1343
+
1342
1344
By default, process retries are disabled for invocation failures caused by javascript errors. See `OutOfProcessNodeJSServiceOptions.EnableProcessRetriesForJavascriptErrors` for more information.
1343
1345
1344
1346
If the module source of an invocation is an unseekable stream, the invocation is not retried.
Copy file name to clipboardExpand all lines: src/NodeJS/Jering.Javascript.NodeJS.csproj
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
<Authors>JeremyTCD</Authors>
8
8
<Title>Invoke Javascript in NodeJS, from C#</Title>
9
9
<Description>Jering.Javascript.NodeJS enables you to invoke javascript in NodeJS, from C#. With this ability, you can use NodeJS javascript libraries and scripts from C# projects.</Description>
Copy file name to clipboardExpand all lines: src/NodeJS/NodeJSServiceImplementations/OutOfProcess/OutOfProcessNodeJSServiceOptions.cs
+14-13Lines changed: 14 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -24,19 +24,20 @@ public class OutOfProcessNodeJSServiceOptions
24
24
/// </remarks>
25
25
publicintNumRetries{get;set;}=1;
26
26
27
-
/// <summary>The number of new NodeJS processes created to retry an invocation.</summary>
28
-
/// <remarks>
29
-
/// <para>A NodeJS process retries invocations <see cref="NumRetries"/> times. Once a process's retries are exhausted,
30
-
/// if any <b>process retries</b> remain, the library creates a new process that then retries invocations <see cref="NumRetries"/> times.</para>
31
-
/// <para>For example, consider the situation where <see cref="NumRetries"/> and this value are both 1. The existing process first attempts the invocation.
32
-
/// If it fails, it retries the invocation once. If it fails again, the library creates a new process that retries the invocation once. In total, the library
33
-
/// attempt the invocation 3 times.</para>
34
-
/// <para>If this value is negative, the library creates new NodeJS processes indefinitely.</para>
35
-
/// <para>By default, process retries are disabled for invocation failures caused by javascript errors. See <see cref="EnableProcessRetriesForJavascriptErrors"/> for more information.</para>
36
-
/// <para>If the module source of an invocation is an unseekable stream, the invocation is not retried.
37
-
/// If you require retries for such streams, copy their contents to a <see cref="MemoryStream"/>.</para>
38
-
/// <para>Defaults to 1.</para>
39
-
/// </remarks>
27
+
/// <summary>The number of NodeJS processes created to retry an invocation.</summary>
28
+
/// <remarks>
29
+
/// <para>A NodeJS process retries invocations <see cref="NumRetries"/> times. Once a process's retries are exhausted,
30
+
/// if any <b>retry-processes</b> remain, the library creates a new process and retries invocations <see cref="NumRetries"/> times.</para>
31
+
/// <para>For example, consider the situation where <see cref="NumRetries"/> and this value are both 1. The existing process first attempts the invocation.
32
+
/// If it fails, it retries the invocation once. If it fails again, the library creates a new process that retries the invocation once. In total, the library
33
+
/// attempts the invocation 3 times.</para>
34
+
/// <para>If this value is negative, the library creates new NodeJS processes indefinitely.</para>
35
+
/// <para>If this value is larger than 0 and <see cref="NumRetries"/> is 0, the invocation is retried once in each new process.</para>
36
+
/// <para>By default, process retries are disabled for invocation failures caused by javascript errors. See <see cref="EnableProcessRetriesForJavascriptErrors"/> for more information.</para>
37
+
/// <para>If the module source of an invocation is an unseekable stream, the invocation is not retried.
38
+
/// If you require retries for such streams, copy their contents to a <see cref="MemoryStream"/>.</para>
39
+
/// <para>Defaults to 1.</para>
40
+
/// </remarks>
40
41
publicintNumProcessRetries{get;set;}=1;
41
42
42
43
/// <summary>Whether invocation failures caused by Javascript errors are retried in new processes.</summary>
Assert.Equal(dummyNumProcessRetries,Regex.Matches(resultLog,Strings.LogWarning_InvocationAttemptFailed.Substring(0,30)).Count);// Logs after each retry
647
+
Assert.Equal(dummyNumProcessRetries,Regex.Matches(resultLog,Strings.LogWarning_RetriesInExistingProcessExhausted.Substring(0,30)).Count);// Logs before each process swap
0 commit comments