Documentation in UpdateUserQueueService
This commit is contained in:
parent
bebbfd6411
commit
4003dd81d4
@ -72,6 +72,9 @@ class UpdateUserQueueService(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the full update queue, only pending users.
|
||||||
|
*/
|
||||||
fun getQueue(): List<Long> {
|
fun getQueue(): List<Long> {
|
||||||
return dslContext.select(UPDATE_USER_QUEUE.USER_ID)
|
return dslContext.select(UPDATE_USER_QUEUE.USER_ID)
|
||||||
.from(UPDATE_USER_QUEUE)
|
.from(UPDATE_USER_QUEUE)
|
||||||
@ -99,6 +102,11 @@ class UpdateUserQueueService(
|
|||||||
return insertedRows == 1
|
return insertedRows == 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the given user as processed in the update queue.
|
||||||
|
*
|
||||||
|
* @param userId The user ID of the user to set as processed.
|
||||||
|
*/
|
||||||
fun setUserAsProcessed(userId: Long) {
|
fun setUserAsProcessed(userId: Long) {
|
||||||
dslContext.update(UPDATE_USER_QUEUE)
|
dslContext.update(UPDATE_USER_QUEUE)
|
||||||
.set(UPDATE_USER_QUEUE.PROCESSED, true)
|
.set(UPDATE_USER_QUEUE.PROCESSED, true)
|
||||||
@ -110,7 +118,7 @@ class UpdateUserQueueService(
|
|||||||
// Notify the user that their queue has been processed with fresh info
|
// Notify the user that their queue has been processed with fresh info
|
||||||
messagingTemplate.convertAndSend(
|
messagingTemplate.convertAndSend(
|
||||||
"/topic/live-user/${userId}",
|
"/topic/live-user/${userId}",
|
||||||
UpdateUserQueueService.UserQueueWebsocketPacket(message = "UPDATE_PROGRESS", data = this.getUserQueueDetails(userId))
|
UserQueueWebsocketPacket(message = "UPDATE_PROGRESS", data = this.getUserQueueDetails(userId))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user