Skip to content

Commit

Permalink
add better logs to sync model job
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosQ96 committed Oct 8, 2024
1 parent c2a18ae commit e2e4369
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 1 addition & 4 deletions src/adapters/gitcoin/gitcoinAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ export class GitcoinAdapter implements GitcoinAdapterInterface {
},
},
);
return (
result.data?.details?.models?.ethereum_activity?.score ||
result.data?.details?.models?.aggregate?.score
);
return result.data?.details?.models?.ethereum_activity?.score;
} catch (e) {
logger.error('getUserAnalysisScore error', e);
throw new Error(
Expand Down
7 changes: 4 additions & 3 deletions src/services/cronJobs/syncUsersModelScore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ export const updateUsersWithoutMBDScoreInRound = async () => {
const user = await findUserById(userId);
logger.debug(`User with ${user?.id} fetched from Db`);
if (!user) continue;

logger.debug(`User with ${user?.id} fetching its score`);
logger.debug(
`User ${user.id} with wallet ${user.walletAddress} fetching score`,
);
const userScore = await worker.syncUserScore({
userWallet: user?.walletAddress,
userWallet: user?.walletAddress?.toLowerCase(),
});
logger.debug(`User with ${user?.id} has score of ${userScore}`);
if (userScore) {
Expand Down

0 comments on commit e2e4369

Please sign in to comment.