Submit a Job

Jobs can be submitted with gearman.submitJob(name, payload) where name is the name of the function and payload is a string or a Buffer. The returned object (Event Emitter) can be used to detect job status and has the following events:

Streaming

Worker and job objects also act as Stream objects (workers are writable and jobs readable streams), so you can stream data with pipe from a worker to a client (but not the other way round). This is useful for zipping/unzipping etc.

NB! Streaming support is experimental, do not send very large files as the data tends to clutter up (workers stream interface lacks support for pausing etc.).