MCPcopy Index your code
hub / github.com/bee-queue/bee-queue / fromData

Method fromData

lib/job.js:34–41  ·  view source on GitHub ↗
(queue, jobId, data)

Source from the content-addressed store, hash-verified

32 }
33
34 static fromData(queue, jobId, data) {
35 // no need for try-catch here since we made the JSON ourselves in Job#toData
36 data = JSON.parse(data);
37 const job = new Job(queue, jobId, data.data, data.options);
38 job.status = data.status;
39 job.progress = data.progress;
40 return job;
41 }
42
43 toData() {
44 return JSON.stringify({

Callers 2

fromIdMethod · 0.80
_addJobsByIdsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected