fetch for all users, not only the amount specified for max_items_to_process

(since there is no ordering, some might never be fetched like this)
This commit is contained in:
OMGeeky
2024-06-28 22:51:47 +02:00
parent 7726acf5b6
commit 3396a5b3cd

View File

@@ -5,7 +5,6 @@ use twba_local_db::entities::videos::ActiveModel;
use twba_local_db::prelude::{Status, Users, UsersColumn, Videos, VideosColumn};
use twba_local_db::re_exports::sea_orm::{
ActiveModelTrait, ActiveValue, ColumnTrait, DatabaseConnection, EntityTrait, QueryFilter,
QuerySelect,
};
use twba_twitch_data::TwitchClient;
@@ -29,7 +28,6 @@ impl<'a> FetcherClient<'a> {
pub(crate) async fn fetch_new_videos(&self) -> Result<()> {
let users = Users::find()
.filter(UsersColumn::Active.eq(true))
.limit(self.conf.max_items_to_process)
.all(&self.db)
.await?;
info!("Fetching videos for {} users", users.len());