Skip to content

Commit 193f6e3

Browse files
committed
db set summary to null if run count with update
1 parent b942429 commit 193f6e3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/gd.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,11 @@ async function walk_and_save ({ fid, not_teamdrive, update, service_account }) {
206206
const unfinished_folders = []
207207
const limit = pLimit(PARALLEL_LIMIT)
208208

209+
if (update) {
210+
const exists = db.prepare('SELECT fid FROM gd WHERE fid = ?').get(fid)
211+
exists && db.prepare('UPDATE gd SET summary=? WHERE fid=?').run(null, fid)
212+
}
213+
209214
const loop = setInterval(() => {
210215
const now = dayjs().format('HH:mm:ss')
211216
const message = `${now} | 已获取对象 ${result.length} | 网络请求 进行中${limit.activeCount}/排队中${limit.pendingCount}`

0 commit comments

Comments
 (0)