Skip to content

Commit

Permalink
refactor: Update item id set usage
Browse files Browse the repository at this point in the history
  • Loading branch information
fzavalia committed Oct 29, 2021
1 parent de6b7ac commit 5964c12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/resetUnsyncedItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { ACL, S3Content } from '../src/S3'

const RESET_IN_PARALLEL = 5
const FAILURE_RETRIES = 3
//const ITEM_ID_SET = new Set([])
// const ITEM_ID_SET = new Set<string>([])

async function run() {
console.log('DB: Connecting...')
Expand All @@ -29,7 +29,6 @@ async function run() {
remoteItems,
catalystItems
)
//.then((items) => items.filter((item) => ITEM_ID_SET.has(item.id)))

const catalystItemsByUrn = catalystItems.reduce((acc, item) => {
acc[item.id] = item
Expand All @@ -40,6 +39,7 @@ async function run() {
(item) =>
item.urn &&
catalystItemsByUrn[item.urn] &&
// ITEM_ID_SET.has(item.id)
isDifferent(item, catalystItemsByUrn[item.urn])
)

Expand Down

0 comments on commit 5964c12

Please sign in to comment.