From a960d57ad80a65d5cf028f2595b38ca07bb46b83 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 4 Jun 2018 23:57:23 +0200 Subject: updating task status on serverrrrrr --- app/relay/modules/test.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/relay/modules/test.js') diff --git a/app/relay/modules/test.js b/app/relay/modules/test.js index 57a324a..8876f7c 100644 --- a/app/relay/modules/test.js +++ b/app/relay/modules/test.js @@ -7,6 +7,12 @@ const cpu = { type: 'perl', script: 'test.pl', params: '--train', + listen: (task, line, i) => { + if ( (parseInt(line) % 10) === 0) { + return { type: 'epoch', task, epoch: (i/10)|0 } + } + return null + } } const gpu = { type: 'python', -- cgit v1.2.3-70-g09d2