Added sleep to resolution update task

...to throttle the number of request fired in a small amount of time
This commit is contained in:
0xboobface 2018-10-27 23:27:44 +02:00
parent e97b417480
commit 88d8430f98
1 changed files with 2 additions and 2 deletions

View File

@ -207,6 +207,8 @@ public class ThumbCell extends StackPane {
LOG.trace("Removing invalid resolution value for {}", model.getName());
model.invalidateCacheEntries();
}
Thread.sleep(500);
} catch (ExecutionException | IOException | InterruptedException e1) {
LOG.warn("Couldn't update resolution tag for model {}", model.getName(), e1);
} finally {
@ -412,13 +414,11 @@ public class ThumbCell extends StackPane {
}
public void setModel(Model model) {
//this.model = model;
this.model.setName(model.getName());
this.model.setDescription(model.getDescription());
this.model.setPreview(model.getPreview());
this.model.setTags(model.getTags());
this.model.setUrl(model.getUrl());
update();
}