Resource

Resource

Main class for custom resources to override.

Constructor

new Resource(_id, name, checkInterval, autoCloseTimeout)

Source:

Cosntructor

Parameters:
Name Type Description
_id string

resource id

name string

resource name

checkInterval number

resource ping interval in miliseconds

autoCloseTimeout number

resource close timeout in miliseconds

Methods

checkActive()

Source:

Check if resource is active

close()

Source:

Close resource

closed()

Source:

Called when resource closes

done(job, error)

Source:

Job done

Parameters:
Name Type Description
job Job

that is completed

error Error

error if any happened

kill()

Source:

Kill resource

open()

Source:

Open resource

opened()

Source:

Called when resource opens

start(channel, db, Constructor)

Source:

Start channel communication

Parameters:
Name Type Description
channel object

channel to use

db object

database connection

Constructor function

cosntructor for job