heroku应用程序没有永远运行script.js

时间:2014-07-05 17:33:51

标签: heroku forever

我在本地系统上创建了一个heroku应用程序并将其推送到heroku然后我跑了

heroku run node_modules/forever/bin/forever start server.js

我收到了这个回复 -

warn:    --minUptime not set. Defaulting to: 1000ms
warn:    --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
info:    Forever processing file: server.js

然后如果我跑

heroku run node_modules/forever/bin/forever list

我得到了 -

Running `node_modules/forever/bin/forever list` attached to terminal... up, run.5132
info:    No forever processes running

这里的heroku日志有 -

Starting process with command `node_modules/forever/bin/forever start server.js` by harshitladdha93@gmail.com
2014-07-05T17:24:54.833343+00:00 heroku[run.5098]: State changed from starting to up
2014-07-05T17:24:58.695683+00:00 heroku[run.5098]: State changed from up to complete
2014-07-05T17:24:58.689043+00:00 heroku[run.5098]: Process exited with status 0

这个,我的server.js有 -

var async = require('async');
var shell = require('shelljs');

async.parallel([
        async.apply(shell.exec, './collect1.sh'),
        async.apply(shell.exec, './collect2.sh'),
        async.apply(shell.exec, './collect3.sh'),
        async.apply(shell.exec, './collect4.sh'),
        async.apply(shell.exec, './collect5.sh'),
        async.apply(shell.exec, './mi2.sh'),
    ],
    function (err, results) {
        console.log(results);
    });

并且这些shell脚本是长时间执行的文件,有大量的延迟,但日志说从完成到状态,但我不明白为什么在我的本地系统中它会创建更多的进程和睡眠状态它运行正常 所以,heroku不允许这样做,或者我在这里犯了一些错误。

0 个答案:

没有答案