[Updated] Finished Frontend, Added statushandling to backend and frontend [Todo: session token handling at lvl 2]

This commit is contained in:
Ninjaws
2024-11-01 17:02:24 +01:00
parent 3188f6ce20
commit 675bdc7f8e
16 changed files with 247 additions and 102 deletions
@@ -15,10 +15,14 @@ public class QueueService {
* Executes them in order, one every 5 seconds (the limit of the external API)
* Removes them from the Queue when the request was succesful
*/
private final BlockingQueue<Request> requests = new LinkedBlockingQueue<>();
private final BlockingQueue<Request> requests = new LinkedBlockingQueue<>(5);
public void addToQueue(Request request) {
requests.add(request);
/**
* Offer automatically doesn't add it to the queue if it is full, so no Exceptions thrown
* @return Whether it's possible to add the request to the queue
*/
public boolean addToQueue(Request request) {
return requests.offer(request);
}
public Request popFromQueue() {