Skip to content

Commit

Permalink
#16 add auto self-healing doc
Browse files Browse the repository at this point in the history
  • Loading branch information
wilk committed Nov 13, 2018
1 parent 300e9d1 commit 04d2665
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ $ export MAX_WORKERS=10; node --experimental-worker index.js

Invoking `job` on a function will put it on a task queue and then, when a worker is available, it will be executed, returning the desired result or an error.

### Auto self-healing

When a worker dies, the execution gets back to the caller and then the Worker Pool tries to spawn a new worker to refill its pool.

Every worker has 3 types of state:

- off
- spawning
- ready

If the Worker Pool finds workers in an "off" state, it tries to revive them.

## Setup

Before working with microjob you need to boot the worker pool:
Expand Down

0 comments on commit 04d2665

Please sign in to comment.