IPCJob

IPCJob

Job which runs in 2 processes:

  • Initiator process (Countly master) creates subprocess (fork of executor.js) and processes IPC messages from subprocess
  • Subprocess actually runs the job, but sends state updates through IPC, keeping all listeners aware of its lifecycle

This complex structure gives following advantage:

  • Subprocess can safely crash, initiator process will be able to just restart the job in a new subprocess from the point it stopped.

Extends ResourcefulJob, meaning job resource can live longer than job and reassigned to other job after current job is done.

Works in combination with IPCFaçadeJob which listens for IPC status messages from subprocess and persists them in DB.

Constructor

new IPCJob()

Source:

Members

isInExecutor

Source:

Check if job is run in executor

Methods

_save(data) → {Promise}

Source:

Save resource data

Parameters:
Name Type Description
data object

resource data

Returns:

promise

Type
Promise

releaseResource() → {Promise}

Source:

Release resource

Returns:

promise

Type
Promise

retryPolicy() → {RetryPolicy}

Source:

Get retry policy

Returns:

retry policy

Type
RetryPolicy