Skip to content

Commit

Permalink
Fix for addRegistrationCredit job data & additional logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jim-toth committed Aug 9, 2024
1 parent f9e7c00 commit fc2dba6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/events/events.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ export class EventsService implements OnApplicationBootstrap {
name: 'add-registration-credit',
queueName: 'registrator-updates-queue',
data: {
account: accountString,
address: accountString,
fingerprint: fingerprintString,
tx: event.transactionHash
},
Expand Down
7 changes: 5 additions & 2 deletions src/events/processors/registrator-updates-queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@ export class RegistratorUpdatesQueue extends WorkerHost {
async process(
job: Job<any, any, string>,
): Promise<boolean | undefined> {
this.logger.debug(`Dequeueing ${job.name} [${job.id}] - ${job.data}`)
this.logger.debug(
`Dequeueing ${job.name} [${job.id}] - ${JSON.stringify(job.data)}`
)

switch (job.name) {
case RegistratorUpdatesQueue.JOB_ADD_REGISTRATION_CREDIT:
try {
const data: AddRegistrationCreditEventData = job.data as AddRegistrationCreditEventData
const data: AddRegistrationCreditEventData =
job.data as AddRegistrationCreditEventData
if (data != undefined) {
this.logger.log(
`Adding registration credit for ${data.address} seen at ${data.tx}`,
Expand Down

0 comments on commit fc2dba6

Please sign in to comment.