@@ -8,11 +8,7 @@ const CONCURRENCY = 5
88 * http://nginx.org/en/docs/http/ngx_http_core_module.html#large_client_header_buffers
99 */
1010const MAX_CLUSTER_STATUS_CIDS = 120
11- /**
12- * @typedef {import('../../../api/src/utils/db-types').definitions } definitions
13- * @type Array<definitions["pin"]["service"]>
14- **/
15- const CLUSTERS = [ 'IpfsCluster' , 'IpfsCluster2' , 'IpfsCluster3' , 'ElasticIpfs' ]
11+ const CLUSTERS = [ 'IpfsCluster' , 'IpfsCluster2' , 'IpfsCluster3' ]
1612
1713/**
1814 * @typedef {import('pg').Client } Client
@@ -21,8 +17,8 @@ const CLUSTERS = ['IpfsCluster', 'IpfsCluster2', 'IpfsCluster3', 'ElasticIpfs']
2117 * cluster1: import('@nftstorage /ipfs-cluster').Cluster
2218 * cluster2: import('@nftstorage/ipfs-cluster').Cluster
2319 * cluster3: import('@nftstorage/ipfs-cluster').Cluster
24- * pickup: import('@nftstorage/ipfs-cluster').Cluster
2520 * }} Config
21+ * @typedef {import('../../../api/src/utils/db-types').definitions } definitions
2622 * @typedef {Pick<definitions['pin'], 'id'|'status'|'service'|'inserted_at'|'updated_at'> & { source_cid: string } } Pin
2723 * @typedef {import('@supabase/postgrest-js').PostgrestQueryBuilder<Pin> } PinQuery
2824 */
@@ -149,7 +145,7 @@ UPDATE pin AS p
149145 * }} config
150146 */
151147async function updatePinStatuses ( config ) {
152- const { countPins, fetchPins, pg, pickup } = config
148+ const { countPins, fetchPins, pg, cluster3 } = config
153149 if ( ! log . enabled ) {
154150 console . log ( 'ℹ️ Enable logging by setting DEBUG=pins:updatePinStatuses' )
155151 }
@@ -186,7 +182,7 @@ async function updatePinStatuses(config) {
186182 /** @type {Pin[] } */
187183 const updatedPins = [ ]
188184 const cids = pins . map ( ( p ) => p . source_cid )
189- const statuses = await pickup . statusAll ( { cids } )
185+ const statuses = await cluster3 . statusAll ( { cids } )
190186 const statusByCid = Object . fromEntries ( statuses . map ( ( s ) => [ s . cid , s ] ) )
191187
192188 for ( const pin of pins ) {
0 commit comments