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 74c0db4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/adapters/gitcoin/gitcoinAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ export class GitcoinAdapter implements GitcoinAdapterInterface {
},
);
return (

Check failure on line 45 in src/adapters/gitcoin/gitcoinAdapter.ts

View workflow job for this annotation

GitHub Actions / test

Replace `(⏎········result.data?.details?.models?.ethereum_activity?.score⏎······)` with `result.data?.details?.models?.ethereum_activity?.score`
result.data?.details?.models?.ethereum_activity?.score ||
result.data?.details?.models?.aggregate?.score
result.data?.details?.models?.ethereum_activity?.score
);
} catch (e) {
logger.error('getUserAnalysisScore error', e);
Expand Down
5 changes: 2 additions & 3 deletions src/services/cronJobs/syncUsersModelScore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ 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`)

Check failure on line 47 in src/services/cronJobs/syncUsersModelScore.ts

View workflow job for this annotation

GitHub Actions / test

Replace ``User·${user.id}·with·wallet·${user.walletAddress}·fetching·score`)` with `⏎········`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 74c0db4

Please sign in to comment.