-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configurable subscription interval time #2798
Configurable subscription interval time #2798
Conversation
I'm not totally sure if this is the best way to do it, so I'd be happy to get feedback on this! |
The corresponding change in the documentation: ViewTube/wiki#10 |
Thank you very much for this PR! Very sorry it took me so long, I'll take a look at the changes ASAP |
@patricgruber Looks very good already |
private schedulerRegistry: SchedulerRegistry | ||
) { | ||
// initialize without blocking | ||
void this.initializeSubscriptionTask(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would run this in the main.ts file, like this.
const subscriptionsService = app.get(SubscriptionsService);
void subscriptionsService.initializeSubscriptionTask();
videos: [], | ||
videoCount: 0, | ||
lastRefresh: null, | ||
refreshInterval: this.getSubscriptionIntervalTime() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add this property to the SubscriptionFeedResponseDto (subscription-feed-response.dto.ts)
Thank you for the quick review! I changed the code as requested |
I see, there may be a difference between the two |
I think this looks perfect now, do agree? |
Yes, looks good to me! |
This pull requests makes the subscription refresh time configurable via environment variable as described in #1928