Skip to content

Commit

Permalink
Merge pull request #214 from DestinyItemManager/bhollis-patch-2
Browse files Browse the repository at this point in the history
Put back tag_cleanup
  • Loading branch information
bhollis authored May 16, 2024
2 parents 5de31f1 + 2b8ed20 commit fdb00ef
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions api/routes/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import asyncHandler from 'express-async-handler';
import { ClientBase } from 'pg';
import { transaction } from '../db/index.js';
import {
// deleteItemAnnotationList,
deleteItemAnnotationList,
updateItemAnnotation as updateItemAnnotationInDb,
} from '../db/item-annotations-queries.js';
import { updateItemHashTag as updateItemHashTagInDb } from '../db/item-hash-tags-queries.js';
Expand Down Expand Up @@ -362,18 +362,17 @@ async function updateItemAnnotation(
}

async function tagCleanup(
_client: ClientBase,
_bungieMembershipId: number,
_inventoryItemIds: string[],
client: ClientBase,
bungieMembershipId: number,
inventoryItemIds: string[],
): Promise<ProfileUpdateResult> {
// TEMPORARY: Disable tag cleanup while bungie.net is being weird
//const start = new Date();
//await deleteItemAnnotationList(
// client,
// bungieMembershipId,
// inventoryItemIds.filter(isValidItemId),
//);
//metrics.timing('update.tagCleanup', start);
const start = new Date();
await deleteItemAnnotationList(
client,
bungieMembershipId,
inventoryItemIds.filter(isValidItemId),
);
metrics.timing('update.tagCleanup', start);

return { status: 'Success' };
}
Expand Down

0 comments on commit fdb00ef

Please sign in to comment.