1
0
Code Issues Pull Requests Projects Releases Wiki Activity GitHub Gitee
tools/netease_music/watch.js

19 lines
471 B
JavaScript
Raw Permalink Normal View History

2022-10-18 14:42:39 +08:00
let keepWatching = false;
2022-10-02 17:37:28 +08:00
if (keepWatching) {
global.useMysqlPool = true;
2022-10-05 11:41:30 +08:00
global.connectionLimit = 15;
2022-10-02 17:37:28 +08:00
} else {
global.useMysqlPool = false;
}
2022-10-07 20:55:04 +08:00
// global.dbConfig = 'mysql_local';
2022-10-02 23:48:07 +08:00
2022-10-17 13:11:15 +08:00
const neteaseMusic = require('./src/index');
const sleepUtils = require('../utils/sleepUtils');
2022-10-03 01:01:25 +08:00
async function main() {
do {
await neteaseMusic.watch();
2022-11-07 19:00:11 +08:00
keepWatching && await sleepUtils.sleep(10 * 1000);
2022-10-03 01:01:25 +08:00
} while (keepWatching)
}
main();