add start 手动 (menu测试
This commit is contained in:
parent
732be71a35
commit
e31b5dc739
@ -24,12 +24,13 @@ router.get("/doubanImg",async (ctx)=>{
|
||||
|
||||
|
||||
router.get("/test", async (ctx) => {
|
||||
let res = await utils.uploadImg('C:/Users/11629/Desktop/80032464_p0.jpg')
|
||||
ctx.body = {
|
||||
code: 0,
|
||||
msg: "test",
|
||||
data: res
|
||||
}
|
||||
// let res = await utils.uploadImg('C:/Users/11629/Desktop/80032464_p0.jpg')
|
||||
// ctx.body = {
|
||||
// code: 0,
|
||||
// msg: "test",
|
||||
// data: res
|
||||
// }
|
||||
global.start = true
|
||||
})
|
||||
|
||||
|
||||
|
@ -28,13 +28,15 @@ async function CheckUpdate() {
|
||||
let all = await getSub()
|
||||
for (let i of all) {
|
||||
let time = i.time.split(":")
|
||||
if (hours == time[0] && minutes == time[1]) {
|
||||
if (hours == time[0] && minutes == time[1] || global.start) {
|
||||
addDown(i)
|
||||
}
|
||||
}
|
||||
global.start = false
|
||||
}
|
||||
console.log("开始定时检测更新")
|
||||
// 设置定时器 每分钟检测更新
|
||||
global.start = false
|
||||
let job = schedule.scheduleJob('0 * * * * *', () => {
|
||||
CheckUpdate()
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user