合并仓库前的准备
This commit is contained in:
19
netease_music/watch.js
Normal file
19
netease_music/watch.js
Normal file
@@ -0,0 +1,19 @@
|
||||
let keepWatching = true;
|
||||
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();
|
||||
await sleepUtils.sleep(10 * 1000);
|
||||
} while (keepWatching)
|
||||
}
|
||||
main();
|
Reference in New Issue
Block a user