summaryrefslogtreecommitdiff
path: root/app/relay/modules/test.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/relay/modules/test.js')
-rw-r--r--app/relay/modules/test.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/relay/modules/test.js b/app/relay/modules/test.js
index b0753f8..57a324a 100644
--- a/app/relay/modules/test.js
+++ b/app/relay/modules/test.js
@@ -17,6 +17,15 @@ const live = {
type: 'python',
script: 'test.py',
live: true,
+ listen: (task, line, i) => {
+ if (line.match('orange')) {
+ return { type: 'progress', task, mode: 'orange', progress: i }
+ }
+ if ( (i % 10) === 9) {
+ return { type: 'epoch', task, epoch: (i/10)|0 }
+ }
+ return null
+ }
}
export default {