mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-08-14 23:51:41 +00:00
Set statement timeout to 20s for feed. (#309)
This commit is contained in:
parent
bcb0d32daa
commit
78b52d70f5
1 changed files with 5 additions and 2 deletions
|
@ -880,7 +880,7 @@ public class ResponseHelper {
|
|||
|
||||
List<StreamItem> feedItems = new ObjectArrayList<>();
|
||||
|
||||
for (Video video : s.createQuery(criteria).list()) {
|
||||
for (Video video : s.createQuery(criteria).setTimeout(20).list()) {
|
||||
var channel = video.getChannel();
|
||||
|
||||
feedItems.add(new StreamItem("/watch?v=" + video.getId(), video.getTitle(),
|
||||
|
@ -930,7 +930,10 @@ public class ResponseHelper {
|
|||
))
|
||||
.orderBy(cb.desc(root.get("uploaded")));
|
||||
|
||||
List<Video> videos = s.createQuery(criteria).setMaxResults(100).list();
|
||||
List<Video> videos = s.createQuery(criteria)
|
||||
.setTimeout(20)
|
||||
.setMaxResults(100)
|
||||
.list();
|
||||
|
||||
final List<SyndEntry> entries = new ObjectArrayList<>();
|
||||
|
||||
|
|
Loading…
Reference in a new issue