Add CallLinkDeleteManager to retry and ensure deletion
This commit is contained in:
parent
8b627b3f1a
commit
a40d54099c
8 changed files with 229 additions and 89 deletions
|
@ -305,16 +305,13 @@ export function getAllCallLinkRecordsWithAdminKey(
|
|||
.map(item => callLinkRecordSchema.parse(item));
|
||||
}
|
||||
|
||||
export function getAllMarkedDeletedCallLinks(
|
||||
export function getAllMarkedDeletedCallLinkRoomIds(
|
||||
db: ReadableDB
|
||||
): ReadonlyArray<CallLinkType> {
|
||||
): ReadonlyArray<string> {
|
||||
const [query] = sql`
|
||||
SELECT * FROM callLinks WHERE deleted = 1;
|
||||
SELECT roomId FROM callLinks WHERE deleted = 1;
|
||||
`;
|
||||
return db
|
||||
.prepare(query)
|
||||
.all()
|
||||
.map(item => callLinkFromRecord(callLinkRecordSchema.parse(item)));
|
||||
return db.prepare(query).pluck().all();
|
||||
}
|
||||
|
||||
// TODO: Run this after uploading storage records, maybe periodically on startup
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue