Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kadamidev committed Jan 9, 2025
1 parent b5610d1 commit d6b2da2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 2 additions & 3 deletions desci-server/src/scripts/fixPublish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { logger as parentLogger } from '../logger.js';
import { redisClient } from '../redisClient.js';
import { publishSequencer, PublishServices } from '../services/PublishServices.js';
import { getIndexedResearchObjects } from '../theGraph.js';
import { cleanupManifestUrl } from '../utils/manifest.js';
import { hexToCid } from '../utils.js';

import { invalidateByUuid } from './invalidate-redis-cache.js';
Expand Down Expand Up @@ -71,7 +70,7 @@ async function fixByNodeUuids({
const nodeUuidsArr = nodeUuids.split(',');
const total = nodeUuidsArr.length;
logger.info(`[fixByNodeUuids] nodeUuids loaded for fixing: ${total}`);
// debugger;
debugger;

for (let index = 0; index < nodeUuidsArr.length; index++) {
let nodeUuid = nodeUuidsArr[index];
Expand All @@ -97,7 +96,7 @@ async function fixByNodeUuids({
const commitId = ascendingVersions[nodeVersIdx]?.commitId;
// const manifestUrl = cleanupManifestUrl(manifestCid);

cLogger.info(`[fixByNodeUuids] Fixing version: ${nodeVersIdx}, with commitId: ${commitId}`);
cLogger.info(`[fixByNodeUuids] Fixing version: ${nodeVersIdx + 1}, with commitId: ${commitId}`);

if (createIjPublishStatusEntry) {
// Add IJ publishStatus entry for the commitId
Expand Down
4 changes: 3 additions & 1 deletion desci-server/src/scripts/invalidate-redis-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ export async function invalidateByUuid({ nodeUuid }: { nodeUuid: string }) {
const totalVersionsIndexed = indexedNode.versions.length || 0;
try {
for (let nodeVersIdx = 0; nodeVersIdx < totalVersionsIndexed; nodeVersIdx++) {
const txHash = indexedNode.versions[nodeVersIdx]?.id;
const commitId = indexedNode.versions[nodeVersIdx]?.commitId;
logger.info(
`[invalidateByUuid] Deleting keys for indexed version: ${nodeVersIdx}, with txHash: ${indexedNode.versions[nodeVersIdx]?.id}`,
`[invalidateByUuid] Deleting keys for indexed version: ${nodeVersIdx}, with ${txHash ? 'txHash: ' + txHash : 'commitId: ' + commitId}`,
);
const hexCid = indexedNode.versions[nodeVersIdx]?.cid || indexedNode.recentCid;
const manifestCid = hexToCid(hexCid);
Expand Down

0 comments on commit d6b2da2

Please sign in to comment.