11#!/usr/bin/env node
22
3- var redisURL = process . env . REDIS_URL ? { url : process . env . REDIS_URL } : undefined
4-
53var docopt = require ( 'docopt' ) . docopt ;
64
75var doc = "\
@@ -25,22 +23,9 @@ if (opts['--submit']) {
2523 return ;
2624}
2725
28- var fs = require ( 'fs' ) ,
29- pathtool = require ( 'path' ) ,
30- redis = require ( 'redis' ) ,
31- rcl = redisURL ? redis . createClient ( redisURL ) : redis . createClient ( ) ,
32- wflib = require ( '../wflib' ) . init ( rcl ) ,
33- Engine = require ( '../engine2' ) ,
34- async = require ( 'async' ) ,
35- AdmZip = require ( 'adm-zip' ) ,
36- dbId = 0 ,
37- plugins = [ ] ,
38- recoveryMode = false , recoveryData = { 'input' : [ ] , 'outputs' : { } , 'settings' : { } } ,
39- glob = require ( 'glob' ) ,
40- wfDirFull ,
41- hflowRun = require ( '../common/wfRun.js' ) . hflowRun ;
26+ var hflowRun = require ( '../common/wfRun.js' ) . hflowRun ,
27+ hflowStartServer = require ( '../common/wfRun.js' ) . hflowStartServer ;
4228
43- var hfroot = pathtool . join ( require ( 'path' ) . dirname ( require . main . filename ) , ".." ) ;
4429
4530// Workflow variables TODO: add support for config files
4631
@@ -73,14 +58,6 @@ function hflowSubmit(opts) {
7358 } ) ;
7459}
7560
76- function hflowStartServer ( ) {
77- var server = require ( '../server/hyperflow-server.js' ) ( rcl , wflib , plugins ) ;
78- let hostname = '127.0.0.1' , port = process . env . PORT ;
79- server . listen ( port , ( ) => {
80- console . log ( "HyperFlow server started, app factory URI: http://%s:%d/apps" , server . address ( ) . address , server . address ( ) . port ) ;
81- } ) ;
82- }
83-
8461function hflowSend ( opts ) {
8562 console . log ( "send signal to a workflow: not implemented" ) ;
8663}
0 commit comments