diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-20 16:12:38 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-20 16:12:38 +0200 |
| commit | 09b4d1541e6e06563a40f8829048e4225ed8fcf9 (patch) | |
| tree | 4d4547b855f3f006dd0b7fc28e558b7167af278d /app/relay | |
| parent | 4ccd160957e84c95c4f311333385f3eda130652c (diff) | |
mandatory results folder
Diffstat (limited to 'app/relay')
| -rw-r--r-- | app/relay/modules/pix2pixhd.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/app/relay/modules/pix2pixhd.js b/app/relay/modules/pix2pixhd.js index 4c169e8..8f1db54 100644 --- a/app/relay/modules/pix2pixhd.js +++ b/app/relay/modules/pix2pixhd.js @@ -122,6 +122,32 @@ const live = { '--norm', 'batch', ] }, + listen: (task, res, i) => { + // relay the new dataset name from youtube-dl or w/e + const lines = res.split('\n') + for (let line of lines) { + console.log(line) + if ( line.match(/^rename result: /) ) { + let tag = line.split(': ')[1].trim() + task.dataset = tag + console.log(">>>>>> created dataset", tag) + return { type: 'progress', action: 'resolve_dataset', task } + } + } + return null + }, + after: 'render', +} +const render = { + type: 'perl', + script: 'dir-to-movie.pl', + params: (task) => { + return [ + '--tag', task.dataset, + '--module', task.module, + '--endpoint', process.env.API_REMOTE + '/api/folder/' + task.opt.folder_id + '/upload/', + ] + } } export default { @@ -132,5 +158,6 @@ export default { train, generate, live, + render, } } |
