Skip to content

Commit 7991f99

Browse files
committed
add watcher
1 parent 9cdea5d commit 7991f99

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/executor.circle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ async function circleExecutor(runOptions, commandsArray): Promise<{ retriable: s
9595
logProcessesProgress &&
9696
setInterval(() => logMiddleResultsCycle(initialCommandsCount, commands, inProgressCommands), 5000);
9797

98-
const watcherRunner = watcher && setInterval(watcher, 5000);
98+
const watcherRunner = watcher && setInterval(() => watcher(Array.from(notRetriable), Array.from(retriable)), 5000);
9999

100100
do {
101101
if (commands.length) {

lib/executor.intime.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ async function intimeExecutor(runOptions, commandsArray): Promise<{ retriable: s
9494
logProcessesProgress &&
9595
setInterval(() => logMiddleResultsCycle(initialCommandsCount, commands, inProgressCommands), 5000);
9696

97-
const watcherRunner = watcher && setInterval(watcher, 5000);
97+
const watcherRunner = watcher && setInterval(() => watcher(Array.from(notRetriable), Array.from(retriable)), 5000);
9898

9999
do {
100100
if (commands.length) {

lib/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export type TBuildOpts = {
2222
execOpts?: ExecOptions;
2323
processResultAnalyzer?: (originalCommand: string, stack: string, notRetriable: any[]) => string | boolean;
2424
everyCycleCallback?: () => void;
25-
watcher?: () => void;
25+
watcher?: (notRetriable?: string[], retriable?: string[]) => void;
2626
currentExecutionVariable?: string;
2727
logProcessesProgress?: boolean;
2828
logStartCycle?: (maxThreads: number | string, attemptsCount: number | string, inTimeCommands: string[]) => void;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "process-rerun",
3-
"version": "0.4.4",
3+
"version": "0.5.0",
44
"repository": {
55
"type": "git",
66
"url": "git+https://github.com/potapovDim/protractor-rerun.git"

0 commit comments

Comments
 (0)