2022-10-02 23:48:07 +08:00
|
|
|
let keepWatching = true;
|
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
|
|
|
|
|
|
|
const neteaseMusic = require('./netease_music/index');
|
2022-10-03 01:01:25 +08:00
|
|
|
const sleepUtils = require('./utils/sleepUtils');
|
|
|
|
|
|
|
|
async function main() {
|
|
|
|
do {
|
|
|
|
await neteaseMusic.watch();
|
2022-10-03 14:32:04 +08:00
|
|
|
await sleepUtils.sleep(10 * 1000);
|
2022-10-03 01:01:25 +08:00
|
|
|
} while (keepWatching)
|
|
|
|
}
|
|
|
|
main();
|