@@ -102,12 +102,6 @@ export class Database {
102102 } , 0 ) ;
103103 } ;
104104
105- // Helper function to forcibly acquire a lock for a specific schema
106- const forciblyAcquireLockForSchema = async ( lockId : number ) => {
107- // This will block until the lock is acquired
108- await client . query ( `SELECT pg_advisory_lock(${ lockId } )` ) ;
109- } ;
110-
111105 // Helper function to acquire a lock for a specific schema
112106 const acquireLockForSchema = async ( lockId : number ) => {
113107 const result = await client . query (
@@ -124,8 +118,6 @@ export class Database {
124118
125119 // Acquire locks for all schemas
126120 const chainDataLockId = generateLockId ( this . chainDataSchemaName ) ;
127- // const ipfsDataLockId = generateLockId(this.ipfsDataSchemaName);
128- // const priceDataLockId = generateLockId(this.priceDataSchemaName);
129121
130122 // Track acquired locks
131123 const acquiredLocks : number [ ] = [ ] ;
@@ -134,22 +126,9 @@ export class Database {
134126 const chainDataLockAcquired = await acquireLockForSchema ( chainDataLockId ) ;
135127 if ( chainDataLockAcquired ) acquiredLocks . push ( chainDataLockId ) ;
136128
137- // const ipfsDataLockAcquired = await acquireLockForSchema(ipfsDataLockId);
138- // if (ipfsDataLockAcquired) acquiredLocks.push(ipfsDataLockId);
139- // const priceDataLockAcquired = await acquireLockForSchema(priceDataLockId);
140- // if (priceDataLockAcquired) acquiredLocks.push(priceDataLockId);
141-
142- // NOTE: We are forcibly acquiring locks for IPFS and Price data schemas
143- // await forciblyAcquireLockForSchema(ipfsDataLockId);
144- // await forciblyAcquireLockForSchema(priceDataLockId);
145- // acquiredLocks.push(ipfsDataLockId);
146- // acquiredLocks.push(priceDataLockId);
147-
148129 this . #logger. info ( `Lock Status =>
149130 Chain Data (${ chainDataLockId } ): ${ chainDataLockAcquired }
150131 ` ) ;
151- // IPFS Data (${ipfsDataLockId}): ${ipfsDataLockAcquired},
152- // Price Data (${priceDataLockId}): ${priceDataLockAcquired}
153132
154133 return {
155134 release : async ( ) => {
0 commit comments