Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ public SubmissionScheduler(
}

// handleAllUserSubmissions is a long running async function.
// This EventListener is used to early terminate the Submission Scheduler thread as it doesn't stop when the main
// This EventListener is used to early terminate the Submission Scheduler thread
// as it doesn't stop when the main
// thread is terminated.
@EventListener(ContextClosedEvent.class)
public void onShutdown() {
Expand All @@ -60,15 +61,13 @@ public void handleAllUserSubmissions() {
}

if (user.getLeetcodeUsername() == null) {
LOGGER.info("User with id of {} does not have a leetcode username set.", user.getId());
continue;
}

List<LeetcodeSubmission> leetcodeSubmissions =
leetcodeClient.findSubmissionsByUsername(user.getLeetcodeUsername());

submissionsHandler.handleSubmissions(leetcodeSubmissions, user, false);
LOGGER.info("User with id of {} has been completed", user.getId());
}

LOGGER.info("Scheduled task complete");
Expand Down
Loading