18 lines
420 B
JavaScript
18 lines
420 B
JavaScript
let keepWatching = true;
|
|
if (keepWatching) {
|
|
global.useMysqlPool = true;
|
|
global.connectionLimit = 1;
|
|
} else {
|
|
global.useMysqlPool = false;
|
|
}
|
|
|
|
const neteaseMusic = require('./netease_music/index');
|
|
const sleepUtils = require('./utils/sleepUtils');
|
|
|
|
async function main() {
|
|
do {
|
|
await neteaseMusic.watch();
|
|
await sleepUtils.sleep(2000);
|
|
} while (keepWatching)
|
|
}
|
|
main(); |