Skip to content

Commit

Permalink
PARACHAIN -> PARANET in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksamagicka committed Apr 30, 2024
1 parent 32cdef1 commit 3c90e3b
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions src/service/get-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class GetService extends OperationService {
paranetId,
paranetRepoId,
paranetLatestAsset,
paranetDeleteFromEarlier
paranetDeleteFromEarlier,
} = command.data;

const keywordsStatuses = await this.getResponsesStatuses(
Expand Down Expand Up @@ -104,29 +104,32 @@ class GetService extends OperationService {

if (paranetSync) {
this.logger.debug(
`PARACHAIN_ASSET_SYNC: ${responseData.nquads.length} nquads found for asset with ual: ${ual}, state index: ${stateIndex}, assertionId: ${assertionId}`,
`PARANET_ASSET_SYNC: ${responseData.nquads.length} nquads found for asset with ual: ${ual}, state index: ${stateIndex}, assertionId: ${assertionId}`,
);

if (paranetLatestAsset) {
await this.tripleStoreService.localStoreAsset(
`${this.paranetIdService.getParanetRepositoryName(paranetId)}-${TRIPLE_STORE_REPOSITORIES.PUBLIC_CURRENT}`,
`${this.paranetIdService.getParanetRepositoryName(paranetId)}-${
TRIPLE_STORE_REPOSITORIES.PUBLIC_CURRENT
}`,
assertionId,
responseData.nquads,
blockchain,
contract,
tokenId,
keyword,
);
}
else if (paranetRepoId) {
const newRepoName = `${this.paranetIdService.getParanetRepositoryName(paranetId)}-${paranetRepoId}`;
} else if (paranetRepoId) {
const newRepoName = `${this.paranetIdService.getParanetRepositoryName(
paranetId,
)}-${paranetRepoId}`;

if (paranetDeleteFromEarlier) {
// This was the previous latest one, move it to currentHistory
this.logger.debug(
`PARACHAIN_ASSET_SYNC: Moving asset to repo ${newRepoName}, with ual: ${ual}, state index: ${stateIndex}, assertionId: ${assertionId}`,
);
`PARANET_ASSET_SYNC: Moving asset to repo ${newRepoName}, with ual: ${ual}, state index: ${stateIndex}, assertionId: ${assertionId}`,
);

await this.tripleStoreService.moveAsset(
newRepoName,
assertionId,
Expand All @@ -135,13 +138,12 @@ class GetService extends OperationService {
tokenId,
keyword,
);
}
else {
} else {
// This is one of the older assets, just update it

this.logger.debug(
`PARACHAIN_ASSET_SYNC: Updating asset in repo ${newRepoName}, with ual: ${ual}, state index: ${stateIndex}, assertionId: ${assertionId}`,
);
`PARANET_ASSET_SYNC: Updating asset in repo ${newRepoName}, with ual: ${ual}, state index: ${stateIndex}, assertionId: ${assertionId}`,
);

await this.tripleStoreService.localStoreAsset(
newRepoName,
Expand Down

0 comments on commit 3c90e3b

Please sign in to comment.