(jobType, input, other)
| 2 | const { sleep } = require('lib/common-utils') |
| 3 | |
| 4 | function create (jobType, input, other) { |
| 5 | let url = '/db/background-jobs' |
| 6 | if (other) { |
| 7 | url = '/' + other + url |
| 8 | } |
| 9 | return fetchJson(url, { |
| 10 | method: 'POST', |
| 11 | json: { type: jobType, input } |
| 12 | }) |
| 13 | } |
| 14 | |
| 15 | function get (jobId, other, options = {}) { |
| 16 | let url = `/db/background-jobs/${jobId}` |
nothing calls this directly
no outgoing calls
no test coverage detected