mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-12-13 13:50:28 +05:30
Set statement timeout to 20s for feed. (#309)
This commit is contained in:
parent
bcb0d32daa
commit
78b52d70f5
@ -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 New Issue
Block a user