Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PuppetPadChat: The server always restart on pm2. #1472

Closed
zhoumh1988 opened this issue Jul 12, 2018 · 4 comments
Closed

PuppetPadChat: The server always restart on pm2. #1472

zhoumh1988 opened this issue Jul 12, 2018 · 4 comments

Comments

@zhoumh1988
Copy link

0|lightbot | 13:58:45 INFO Wechaty <padchat> start() v0.19.4 is starting...
0|lightbot | 13:58:45 VERB Wechaty puppet: padchat
0|lightbot | 13:58:45 VERB Wechaty profile: default
0|lightbot | 13:58:45 VERB Wechaty id: cjji57kts000094aljr134yp7
0|lightbot | 13:58:45 SILL StateSwitch <Wechaty> on() is false
0|lightbot | 13:58:45 SILL StateSwitch <Wechaty> on() is false
0|lightbot | 13:58:45 VERB StateSwitch <Wechaty> on(pending) <- (false)
0|lightbot | 13:58:45 VERB MemoryCard load() file: /Users/zhouminghua/Documents/mp/lightbot/default.memory-card.json
0|lightbot | 13:58:45 VERB Wechaty initPuppet() padchat
0|lightbot | 13:58:45 VERB Wechaty initPuppetResolver(padchat)
0|lightbot | 13:58:45 VERB MemoryCard sub(padchat)
0|lightbot | 13:58:45 VERB MemoryCard static sub(MemoryCard<default>, padchat)
0|lightbot | 13:58:45 VERB MemoryCard constructor(default)
0|lightbot | 13:58:45 VERB PuppetConfig puppetResolver(padchat)
0|lightbot | 13:58:45 SILL Config WECHATY_LOG set level to silly
0|lightbot | 13:58:45 INFO Config registering process.on("unhandledRejection") for development/debug
0|lightbot | 13:58:45 VERB Config constructor()
0|lightbot | 13:58:46 SILL Config WECHATY_LOG set level to silly
0|lightbot | 13:58:46 INFO Config registering process.on("unhandledRejection") for development/debug
0|lightbot | 13:58:46 VERB Config constructor()
0|lightbot | 13:58:46 SILL Config WECHATY_LOG set level to silly
0|lightbot | 13:58:46 INFO Config registering process.on("unhandledRejection") for development/debug
0|lightbot | 13:58:46 VERB Config constructor()
0|lightbot | 13:58:47 SILL Accessory #0<Wechaty> constructor()
0|lightbot | 13:58:47 VERB Wechaty contructor()
0|lightbot | 13:58:47 VERB MemoryCard constructor(default)
0|lightbot | 13:58:47 VERB StateSwitch constructor(name=Wechaty)
0|lightbot | 13:58:47 VERB Wechaty on(scan, function) registered
0|lightbot | 13:58:47 VERB Wechaty onFunction(scan)
0|lightbot | 13:58:47 VERB Wechaty on(login, function) registered
0|lightbot | 13:58:47 VERB Wechaty onFunction(login)
0|lightbot | 13:58:47 VERB Wechaty on(logout, function) registered
0|lightbot | 13:58:47 VERB Wechaty onFunction(logout)
0|lightbot | 13:58:47 VERB Wechaty on(message, function) registered
0|lightbot | 13:58:47 VERB Wechaty onFunction(message)
0|lightbot | 13:58:47 VERB Wechaty on(room-topic, function) registered
0|lightbot | 13:58:47 VERB Wechaty onFunction(room-topic)
0|lightbot | 13:58:47 VERB Wechaty on(room-join, function) registered
0|lightbot | 13:58:47 VERB Wechaty onFunction(room-join)
0|lightbot | 13:58:47 VERB Wechaty on(room-leave, function) registered
0|lightbot | 13:58:47 VERB Wechaty onFunction(room-leave)
0|lightbot | 13:58:47 VERB Wechaty on(heartbeat, function) registered
0|lightbot | 13:58:47 VERB Wechaty onFunction(heartbeat)
0|lightbot | 13:58:47 VERB Wechaty on(error, function) registered
0|lightbot | 13:58:47 VERB Wechaty onFunction(error)
0|lightbot | 13:58:47 SILL Wechaty version() form development environment is not availble: ENOENT: no such file or directory, stat '/Users/zhouminghua/Documents/mp/lightbot/node_modules/wechaty/dist/.git'

When on node,server works well.

WECHATY_PUPPET=padchat WECHATY_PUPPET_PADCHAT_TOKEN=*** WECHATY_LOG=silly node lightbot.js

When on pm2, server always restart.

pm2 start ./lightbot.json --env development && pm2 logs lightbot

{
    "apps" : [{
      "name"        : "lightbot",
      "script"      : "./lightbot.js",
      "watch"       : true,
      "env": {
        "WECHATY_PUPPET": "padchat",
        "WECHATY_PUPPET_PADCHAT_TOKEN": "***",
        "WECHATY_LOG": "silly",
        "NODE_ENV": "development"
      }
    }]
}
@zhoumh1988
Copy link
Author

It is fixed.Change option watch to false.

@Zhou-Bill
Copy link

how to fix ?

@zhoumh1988
Copy link
Author

@Zhou-Bill change watch to false

@Zhou-Bill
Copy link

in which files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants