1
0
Code Issues Pull Requests Projects Releases Wiki Activity GitHub Gitee
tools/netease_music/watch.js
2022-11-07 23:21:00 +08:00

19 lines
471 B
JavaScript

let keepWatching = false;
if (keepWatching) {
global.useMysqlPool = true;
global.connectionLimit = 15;
} else {
global.useMysqlPool = false;
}
// global.dbConfig = 'mysql_local';
const neteaseMusic = require('./src/index');
const sleepUtils = require('../utils/sleepUtils');
async function main() {
do {
await neteaseMusic.watch();
keepWatching && await sleepUtils.sleep(10 * 1000);
} while (keepWatching)
}
main();