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

19 lines
460 B
JavaScript

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