Create
pulse.create(name, data)
pulse.create(name, data)
Example Usage
const pulse = new Pulse();
// Create a new job for data analysis
const analysisJob = pulse.create('dataAnalysis', { datasetId: 101 });
analysisJob.save() // If you want to save it
Parameters
name
(string
): The name of the job to be created. This name should correspond to a job type previously defined with thedefine
method, which dictates certain default settings such as priority and result-saving behavior.data
(T
): Data to pass to the job for its execution. This data is used within the job's processing logic and can be any type of data that the job requires.
Returns
Job<T extends JobAttributesData>
: Returns a newJob
instance configured with the provided name and data.
Last updated
Was this helpful?