fffleet-worker 2.7.0 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/worker.js +4 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fffleet-worker",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.0",
|
|
4
4
|
"description": "fffleet worker daemon: runs ffmpeg jobs and serves the fffleet job API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/worker.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"test": "node --test test/*.test.js"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"fffleet": "^2.
|
|
25
|
+
"fffleet": "^2.9.0"
|
|
26
26
|
},
|
|
27
27
|
"keywords": [
|
|
28
28
|
"ffmpeg",
|
package/src/worker.js
CHANGED
|
@@ -58,7 +58,7 @@ export function createWorker({
|
|
|
58
58
|
cache = null,
|
|
59
59
|
log = () => {},
|
|
60
60
|
} = {}) {
|
|
61
|
-
const manager = new JobManager({ slots, kinds, ffmpegPath, workRoot, workerId: id, progressIntervalMs, executors, s3, cache });
|
|
61
|
+
const manager = new JobManager({ slots, kinds, ffmpegPath, workRoot, workerId: id, capabilities: () => capabilities, progressIntervalMs, executors, s3, cache });
|
|
62
62
|
const probes = parseProbes(probe);
|
|
63
63
|
let baseCapabilities = [];
|
|
64
64
|
let probed = [];
|
|
@@ -163,8 +163,9 @@ export function createWorker({
|
|
|
163
163
|
},
|
|
164
164
|
|
|
165
165
|
async start() {
|
|
166
|
-
// type:ffmpeg and type:
|
|
167
|
-
const
|
|
166
|
+
// type:ffmpeg, type:ffprobe and type:flash-analysis come from detection, so a machine without ffmpeg does not claim them.
|
|
167
|
+
const builtIn = new Set(['ffmpeg', 'ffprobe', 'flash-analysis']);
|
|
168
|
+
const types = Object.keys(manager.executors).filter(t => !builtIn.has(t)).map(t => `type:${t}`);
|
|
168
169
|
const schemes = manager.s3 ? ['scheme:s3'] : [];
|
|
169
170
|
baseCapabilities = [...new Set([...(await detectCapabilities(ffmpegPath)), ...types, ...schemes, ...extraCapabilities])];
|
|
170
171
|
await refreshProbes();
|