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

[egg-schedule] cron-style 建议支持自定义 timezone #1274

Closed
zbinlin opened this issue Aug 1, 2017 · 10 comments · Fixed by eggjs/schedule#23
Closed

[egg-schedule] cron-style 建议支持自定义 timezone #1274

zbinlin opened this issue Aug 1, 2017 · 10 comments · Fixed by eggjs/schedule#23

Comments

@zbinlin
Copy link
Contributor

zbinlin commented Aug 1, 2017

当前 schedule 里使用 cron 方式时,不支持设置 timezone,建议把 cron-parser
options 暴露出来用于设置 timezone.

@atian25
Copy link
Member

atian25 commented Aug 1, 2017

可以支持下,欢迎 PR

exports.schedule = {
  type: 'worker',
  cron: '0 0 3 * * *',
  cronOptions: {
    tz: 'Europe/Athens',
  },
  // interval: '1h',
  // immediate: true,
};

@zbinlin
Copy link
Contributor Author

zbinlin commented Aug 2, 2017

嗯,如果没有人提 PR,我晚点来过提。

@zbinlin
Copy link
Contributor Author

zbinlin commented Aug 13, 2017

把 egg-schedule clone 下来,然后运行 npm test 会报错呀:

(PS:运行环境:Archlinux 4.12.3-1-ARCH,Node v7.10.0)

test/schedule.test.js
schedule type worker
2017-08-13 22:08:29,371 INFO 4937 [-/127.0.0.1/-/1ms SCHEDULE /__schedule?path=/home/abc/dev/pr/egg-schedule/test/fixtures/worker/app/schedule/interval.js&type=worker&interval=4000] interval
2017-08-13 22:08:30,008 INFO 4937 [-/127.0.0.1/-/2ms SCHEDULE /__schedule?path=/home/abc/dev/pr/egg-schedule/test/fixtures/worker/app/schedule/sub/cron.js&type=worker&cron=%2F5%20%20*%20*%20*%20*] cron

  ✓ should support interval and cron (7699ms)

2017-08-13 22:08:35,020 INFO 4975 [-/127.0.0.1/-/6ms SCHEDULE /__schedule?path=/home/abc/dev/pr/egg-schedule/test/fixtures/context/app/schedule/sub/cron.js&type=worker&cron=%2F5%20%20*%20*%20*%20*] method: SCHEDULE, path: /__schedule, query: {"path":"/home/abc/dev/pr/egg-schedule/test/fixtures/context/app/schedule/sub/cron.js","type":"worker","cron":"/5 * * * * "}
2017-08-13 22:08:35,023 INFO 4975 [-/127.0.0.1/-/10ms SCHEDULE /__schedule?path=/home/abc/dev/pr/egg-schedule/test/fixtures/context/app/schedule/sub/cron.js&type=worker&cron=
%2F5%20
%20*%20*%20*%20*] hello busi

  ✓ should support context (6672ms)

2017-08-13 22:08:37,014 ERROR 4975 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
2017-08-13 22:08:40,031 INFO 5012 [-/127.0.0.1/-/14ms SCHEDULE /__schedule?path=/home/abc/dev/pr/egg-schedule/test/fixtures/async/app/schedule/sub/cron.js&type=worker&cron=%2F5%20%20*%20*%20*%20*] method: SCHEDULE, path: /__schedule, query: {"path":"/home/abc/dev/pr/egg-schedule/test/fixtures/async/app/schedule/sub/cron.js","type":"worker","cron":"/5 * * * * "}
2017-08-13 22:08:40,032 INFO 5012 [-/127.0.0.1/-/16ms SCHEDULE /__schedule?path=/home/abc/dev/pr/egg-schedule/test/fixtures/async/app/schedule/sub/cron.js&type=worker&cron=
%2F5%20
%20*%20*%20*%20*] hello busi

  ✓ should support async (6818ms)

2017-08-13 22:08:45,716 INFO 5051 [-/127.0.0.1/-/1ms SCHEDULE /__schedule?path=/home/abc/dev/pr/egg-schedule/test/fixtures/immediate/app/schedule/immediate-interval.js&type=worker&immediate=true&interval=4000] immediate-interval
2017-08-13 22:08:45,721 INFO 5052 [-/127.0.0.1/-/3ms SCHEDULE /__schedule?path=/home/abc/dev/pr/egg-schedule/test/fixtures/immediate/app/schedule/immediate-cron.js&type=worker&immediate=true&cron=%2F5%20%20*%20*%20*%20*] immediate-cron
2017-08-13 22:08:49,719 INFO 5052 [-/127.0.0.1/-/1ms SCHEDULE /__schedule?path=/home/abc/dev/pr/egg-schedule/test/fixtures/immediate/app/schedule/immediate-interval.js&type=worker&immediate=true&interval=4000] immediate-interval
2017-08-13 22:08:50,004 INFO 5052 [-/127.0.0.1/-/0ms SCHEDULE /__schedule?path=/home/abc/dev/pr/egg-schedule/test/fixtures/immediate/app/schedule/immediate-cron.js&type=worker&immediate=true&cron=%2F5%20%20*%20*%20*%20*] immediate-cron

  ✓ should support immediate (6791ms)
schedule type all

2017-08-13 22:08:55,011 INFO 5090 [-/127.0.0.1/-/1ms SCHEDULE /__schedule?path=/home/abc/dev/pr/egg-schedule/test/fixtures/all/app/schedule/sub/cron.js&type=all&cron=%2F5%20%20*%20*%20*%20*] cron
2017-08-13 22:08:55,014 INFO 5089 [-/127.0.0.1/-/1ms SCHEDULE /__schedule?path=/home/abc/dev/pr/egg-schedule/test/fixtures/all/app/schedule/sub/cron.js&type=all&cron=%2F5%20%20*%20*%20*%20*] cron
2017-08-13 22:08:56,368 INFO 5090 [-/127.0.0.1/-/2ms SCHEDULE /__schedule?path=/home/abc/dev/pr/egg-schedule/test/fixtures/all/app/schedule/interval.js&type=all&interval=4000] interval
2017-08-13 22:08:56,373 INFO 5089 [-/127.0.0.1/-/2ms SCHEDULE /__schedule?path=/home/abc/dev/pr/egg-schedule/test/fixtures/all/app/schedule/interval.js&type=all&interval=4000] interval

  ✓ should support interval and cron (6608ms)
schedule in plugin

2017-08-13 22:09:00,020 INFO 5125 [-/127.0.0.1/-/1ms SCHEDULE /__schedule?path=/home/abc/dev/pr/egg-schedule/test/fixtures/plugin/plugin/app/schedule/sub/cron.js&type=worker&cron=%2F5%20%20*%20*%20*%20*] cron
2017-08-13 22:09:03,203 INFO 5125 [-/127.0.0.1/-/3ms SCHEDULE /__schedule?path=/home/abc/dev/pr/egg-schedule/test/fixtures/plugin/plugin/app/schedule/interval.js&type=worker&interval=4000] interval

  ✓ should support interval and cron (6709ms)
custom schedule type

2017-08-13 22:09:10,120 INFO 5171 [-/127.0.0.1/-/2ms SCHEDULE /__schedule?path=/home/abc/dev/pr/egg-schedule/test/fixtures/customType/app/schedule/custom.js&type=custom&interval=4000] custom

  ✓ should set agent[SCHEDULE_HANDLER] work (6933ms)
schedule config error

2017-08-13 22:09:11,076 ERROR 5171 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
2017-08-13 22:09:12,752 ERROR 5191 nodejs.unhandledExceptionError: [egg-schedule] schedule.interval or schedule.cron must be present
at baseHander (/home/abc/dev/pr/egg-schedule/agent.js:70:11)
at workerHandler (/home/abc/dev/pr/egg-schedule/agent.js:61:3)
at Messenger.startSchedule (/home/abc/dev/pr/egg-schedule/agent.js:34:7)
at Object.onceWrapper (events.js:293:19)
at emitOne (events.js:101:20)
at Messenger.emit (events.js:191:7)
at Messenger._onMessage (/home/abc/dev/pr/egg-schedule/node_modules/egg/lib/core/messenger.js:116:12)
at emitTwo (events.js:106:13)
at process.emit (events.js:194:7)
at process.nextTick (internal/child_process.js:766:12)
name: 'unhandledExceptionError'
pid: 5191
hostname: ZhuXiaolin

  ✓ should thrown (2601ms)
schedule type undefined

2017-08-13 22:09:15,646 ERROR 5227 nodejs.EggScheduleError: schedule type [undefined] is not defined
at Messenger.startSchedule (/home/abc/dev/pr/egg-schedule/agent.js:30:21)
at Object.onceWrapper (events.js:293:19)
at emitOne (events.js:101:20)
at Messenger.emit (events.js:191:7)
at Messenger._onMessage (/home/abc/dev/pr/egg-schedule/node_modules/egg/lib/core/messenger.js:116:12)
at emitTwo (events.js:106:13)
at process.emit (events.js:194:7)
at process.nextTick (internal/child_process.js:766:12)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
name: 'EggScheduleError'
pid: 5227
hostname: ZhuXiaolin

  ✓ should thrown (2773ms)
schedule cron instruction invalid

2017-08-13 22:09:18,350 ERROR 5265 nodejs.unhandledExceptionError: [egg-schedule] parse cron instruction(invalid instruction) error: Invalid characters, got value: undefinedundefinedundefined
at Function._parseField (/home/abc/dev/pr/egg-schedule/node_modules/cron-parser/lib/expression.js:156:11)
at parse (/home/abc/dev/pr/egg-schedule/node_modules/cron-parser/lib/expression.js:717:36)
at Function.parse (/home/abc/dev/pr/egg-schedule/node_modules/cron-parser/lib/expression.js:728:10)
at Function.parseExpression (/home/abc/dev/pr/egg-schedule/node_modules/cron-parser/lib/parser.js:39:25)
at baseHander (/home/abc/dev/pr/egg-schedule/agent.js:81:25)
at workerHandler (/home/abc/dev/pr/egg-schedule/agent.js:61:3)
at Messenger.startSchedule (/home/abc/dev/pr/egg-schedule/agent.js:34:7)
at Object.onceWrapper (events.js:293:19)
at emitOne (events.js:101:20)
at Messenger.emit (events.js:191:7)
name: 'unhandledExceptionError'
pid: 5265
hostname: ZhuXiaolin

  ✓ should thrown (2697ms)
schedule excute error

2017-08-13 22:09:19,333 ERROR 5276 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
2017-08-13 22:09:23,010 ERROR 5311 nodejs.Error: [egg-schedule] egg-schedule:/home/abc/dev/pr/egg-schedule/test/fixtures/excuteError/app/schedule/interval.js excute error. interval error
at exports.task (/home/abc/dev/pr/egg-schedule/test/fixtures/excuteError/app/schedule/interval.js:9:9)
at exports.task.next ()
at onFulfilled (/home/abc/dev/pr/egg-schedule/node_modules/co/index.js:65:19)
at /home/abc/dev/pr/egg-schedule/node_modules/co/index.js:54:5
at co (/home/abc/dev/pr/egg-schedule/node_modules/co/index.js:50:10)
at createPromise (/home/abc/dev/pr/egg-schedule/node_modules/co/index.js:30:15)
at Messenger.app.messenger.on (/home/abc/dev/pr/egg-schedule/app.js:53:7)
at emitOne (events.js:96:13)
at Messenger.emit (events.js:191:7)
at Messenger._onMessage (/home/abc/dev/pr/egg-schedule/node_modules/egg/lib/core/messenger.js:116:12)

pid: 5311
hostname: ZhuXiaolin

2017-08-13 22:09:25,011 ERROR 5311 nodejs.Error: [egg-schedule] egg-schedule:/home/abc/dev/pr/egg-schedule/test/fixtures/excuteError/app/schedule/interval.js excute error. interval error
at exports.task (/home/abc/dev/pr/egg-schedule/test/fixtures/excuteError/app/schedule/interval.js:9:9)
at exports.task.next ()
at onFulfilled (/home/abc/dev/pr/egg-schedule/node_modules/co/index.js:65:19)
at /home/abc/dev/pr/egg-schedule/node_modules/co/index.js:54:5
at co (/home/abc/dev/pr/egg-schedule/node_modules/co/index.js:50:10)
at createPromise (/home/abc/dev/pr/egg-schedule/node_modules/co/index.js:30:15)
at Messenger.app.messenger.on (/home/abc/dev/pr/egg-schedule/app.js:53:7)
at emitOne (events.js:96:13)
at Messenger.emit (events.js:191:7)
at Messenger._onMessage (/home/abc/dev/pr/egg-schedule/node_modules/egg/lib/core/messenger.js:116:12)

pid: 5311
hostname: ZhuXiaolin

  ✓ should thrown (6600ms)
app.runSchedule
  ✓ should run schedule not exist throw error (822ms)

2017-08-13 22:09:26,888 INFO 4910 [-/127.0.0.1/-/1ms SCHEDULE /__schedule?path=/home/abc/dev/pr/egg-schedule/test/fixtures/worker/app/schedule/sub/cron.js&type=worker&cron=%2F5%20%20*%20*%20*%20*] cron

  ✓ should run schedule by relative path success (1074ms)

2017-08-13 22:09:28,001 INFO 4910 [-/127.0.0.1/-/0ms SCHEDULE /__schedule?path=/home/abc/dev/pr/egg-schedule/test/fixtures/worker/app/schedule/sub/cron.js&type=worker&cron=%2F5%20%20*%20*%20*%20*] cron

  ✓ should run schedule by absolute path success (1103ms)
  1) should run schedule by absolute package path success
stop schedule

Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at one (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at Timeout.safeTimeout [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:102:5)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at one (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at Timeout.safeTimeout [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:102:5)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at one (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at Timeout.safeTimeout [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:102:5)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at one (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at Timeout.safeTimeout [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:102:5)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at Timeout.one [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at Timeout.one [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at Timeout.one [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at Timeout.one [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at Timeout.one [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at Timeout.one [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at one (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at Timeout.safeTimeout [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:102:5)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at one (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at Timeout.safeTimeout [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:102:5)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at one (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at Timeout.safeTimeout [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:102:5)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at one (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at Timeout.safeTimeout [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:102:5)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at Timeout.one [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at Timeout.one [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at Timeout.one [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at Timeout.one [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at one (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at Timeout.safeTimeout [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:102:5)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at one (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at Timeout.safeTimeout [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:102:5)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at one (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at Timeout.safeTimeout [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:102:5)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at Timeout.one [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at one (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at Timeout.safeTimeout [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:102:5)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)

  ✓ should stop schedule after app closed (11709ms)
dynamic schedule

Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at Timeout.one [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at Timeout.one [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at Timeout.one [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at Timeout.one [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at one (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at Timeout.safeTimeout [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:102:5)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at one (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at Timeout.safeTimeout [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:102:5)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at one (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at Timeout.safeTimeout [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:102:5)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at one (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at Timeout.safeTimeout [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:102:5)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at Timeout.one [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at Timeout.one [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at Timeout.one [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
2017-08-13 22:09:45,019 INFO 5392 [-/127.0.0.1/-/2ms SCHEDULE /__schedule?path=/home/abc/dev/pr/egg-schedule/test/fixtures/dynamic/app/schedule/sub/cron.js&type=worker&cron=%2F5%20%20*%20*%20*%20*] cron

  ✓ should support dynamic disable (6844ms)

Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at Timeout.one [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
2017-08-13 22:09:47,899 INFO 4910 [-/127.0.0.1/-/0ms SCHEDULE /__schedule?path=/home/abc/dev/pr/egg-schedule/test/fixtures/dynamic/app/schedule/interval.js&type=worker&interval=4000&disable=true] interval

  ✓ should support run disabled dynamic schedule (1145ms)
export schedules
  ✓ should export app.schedules (111ms)
safe-timers

Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at Timeout.one [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at one (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at Timeout.safeTimeout [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:102:5)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at one (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at Timeout.safeTimeout [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:102:5)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/dynamic/logs/dynamic/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at one (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at Timeout.safeTimeout [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:102:5)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at one (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at Timeout.safeTimeout [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:102:5)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at one (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at Timeout.safeTimeout [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:102:5)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at one (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at Timeout.safeTimeout [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:102:5)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at Timeout.one [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at Timeout.one [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at Timeout.one [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at Timeout.one [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at Timeout.one [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at Timeout.one [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at Timeout.one [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at one (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at Timeout.safeTimeout [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:102:5)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at one (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at Timeout.safeTimeout [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:102:5)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at one (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at Timeout.safeTimeout [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:102:5)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at one (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at Timeout.safeTimeout [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:102:5)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/worker/logs/worker/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at one (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at Timeout.safeTimeout [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:102:5)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Error: /home/abc/dev/pr/egg-schedule/test/fixtures/dynamic/logs/dynamic/egg-agent.log log stream had been closed
at FileTransport.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/transports/file.js:57:19)
at Map.log (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:73:19)
at Map.Logger.(anonymous function) [as info] (/home/abc/dev/pr/egg-schedule/node_modules/egg-logger/lib/logger.js:141:10)
at sendMessage (/home/abc/dev/pr/egg-schedule/agent.js:53:22)
at one (/home/abc/dev/pr/egg-schedule/agent.js:36:11)
at Timeout.safeTimeout [as _onTimeout] (/home/abc/dev/pr/egg-schedule/agent.js:102:5)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
2017-08-13 22:09:55,017 INFO 5434 [-/127.0.0.1/-/2ms SCHEDULE /__schedule?path=/home/abc/dev/pr/egg-schedule/test/fixtures/safe-timers/app/schedule/sub/cron.js&type=worker&cron=%2F5%20%20*%20*%20*%20*] cron
2017-08-13 22:09:55,044 INFO 5428 [-/127.0.0.1/-/1ms SCHEDULE /__schedule?path=/home/abc/dev/pr/egg-schedule/test/fixtures/safe-timers/app/schedule/interval.js&type=worker&interval=4321] interval

2017-08-13 22:09:49,748 INFO 5418 [egg:logger] init all loggers with options: {"dir":"/home/abc/dev/pr/egg-schedule/test/fixtures/safe-timers/logs/safe-timers","encoding":"utf8","env":"unittest","level":"INFO","consoleLevel":"WARN","disableConsoleAfterReady":false,"outputJSON":false,"buffer":false,"appLogName":"safe-timers-web.log","coreLogName":"egg-web.log","agentLogName":"egg-agent.log","errorLogName":"common-error.log","coreLogger":{},"type":"agent"}
2017-08-13 22:09:49,822 INFO 5418 [egg-watcher:agent] watcher start success
2017-08-13 22:09:50,701 INFO 5418 reschedule 4321
2017-08-13 22:09:50,712 INFO 5418 reschedule 4293
2017-08-13 22:09:54,706 INFO 5418 reschedule 315
2017-08-13 22:09:54,713 INFO 5418 reschedule 292
2017-08-13 22:09:55,007 INFO 5418 [egg-schedule] send message: sendRandom egg-schedule:/home/abc/dev/pr/egg-schedule/test/fixtures/safe-timers/app/schedule/sub/cron.js
2017-08-13 22:09:55,017 INFO 5418 reschedule 4991
2017-08-13 22:09:55,022 INFO 5418 reschedule 4321
2017-08-13 22:09:55,023 INFO 5418 [egg-schedule] send message: sendRandom egg-schedule:/home/abc/dev/pr/egg-schedule/test/fixtures/safe-timers/app/schedule/interval.js

  ✓ should support interval and cron (6637ms)

19 passing (2m)
1 failing

  1. test/schedule.test.js app.runSchedule should run schedule by absolute package path success:
    Error: Cannot find module 'egg/node_modules/egg-logrotator/app/schedule/rotate_by_file.js'
    at Function.resolve (internal/module.js:27:19)
    at Context. (test/schedule.test.js:171:27)
    at process._tickCallback (internal/process/next_tick.js:109:7)
    [use --full-trace to display the full stack trace]

@atian25
Copy link
Member

atian25 commented Aug 14, 2017

Cannot find module 'egg/node_modules/egg-logrotator/app/schedule/rotate_by_file.js

try rm -rf node_modules && npm i

@zbinlin
Copy link
Contributor Author

zbinlin commented Aug 14, 2017

我这里的 egg-logrotator 是直接安装在 node_modules 目录下的,与 egg 在同一级目录,而不是在 egg 的 node_modules 下。难道还需要进入到 egg 里再次 npm i 一次吗?

npm version: 4.2.0

@atian25
Copy link
Member

atian25 commented Aug 14, 2017 via email

@zbinlin
Copy link
Contributor Author

zbinlin commented Aug 14, 2017

但是在 egg-schedule 目录下 npm install 并没有把 egg-logrotator 安装到 node_modules/egg/node_modules 下,现在的目录结构是这样:

node_modules
├── egg
├── egg-logrotator

而不是这样:

node_modules
├── egg
│   ├── node_modules
│   │   ├── egg-logrotator

@atian25
Copy link
Member

atian25 commented Aug 14, 2017 via email

@atian25
Copy link
Member

atian25 commented Sep 29, 2017

@zbinlineggjs/schedule#23 顺便支持了

@zbinlin zbinlin closed this as completed Sep 30, 2017
@atian25
Copy link
Member

atian25 commented Sep 30, 2017

不用手动关闭的,那边合并后会自动 close 这个的。

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

Successfully merging a pull request may close this issue.

3 participants