File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
src/main/java/com/yello/server/infrastructure/rabbitmq/service Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -31,14 +31,14 @@ public void consumeVoteAvailableNotification(final Message message) throws IOExc
31
31
);
32
32
33
33
try {
34
- // boolean exists = cooldownRepository.existsByUserId(voteAvailableQueueResponse.receiverId());
35
- // if (exists) {
36
34
log .info ("[rabbitmq] sending notification in consumer" );
37
35
notificationService .sendVoteAvailableNotification (voteAvailableQueueResponse .receiverId ());
38
- // }
39
36
} catch (Exception exception ) {
40
37
log .error (exception .getMessage ());
41
38
}
42
39
log .info ("[rabbitmq] consumed message in queue" );
43
40
}
44
41
}
42
+ // boolean exists = cooldownRepository.existsByUserId(voteAvailableQueueResponse.receiverId());
43
+ // if (exists) {
44
+ // }
Original file line number Diff line number Diff line change @@ -19,7 +19,11 @@ public class ProducerRabbitmqService implements ProducerService {
19
19
@ Override
20
20
public void produceVoteAvailableNotification (Cooldown cooldown ) {
21
21
LocalDateTime end = cooldown .getCreatedAt ().plusMinutes (2 );
22
+
23
+ log .info ("[rabbitmq] end = " + end .toString ());
22
24
final long expiration = Duration .between (cooldown .getCreatedAt (), end ).toMillis ();
25
+ log .info ("[rabbitmq] expiration sec = " + Duration .between (cooldown .getCreatedAt (), end ).getSeconds ());
26
+ log .info ("[rabbitmq] expiration = " + expiration );
23
27
24
28
VoteAvailableQueueResponse voteAvailableQueueResponse = VoteAvailableQueueResponse .builder ()
25
29
.receiverId (cooldown .getUser ().getId ())
You can’t perform that action at this time.
0 commit comments