Move the default pagination limit into a const

This commit is contained in:
Kerollmops
2025-12-09 15:24:12 +01:00
parent 051c084aba
commit 0be7db9b42

View File

@@ -31,6 +31,9 @@ use crate::{Error, IndexSchedulerOptions, Result, TaskId};
/// The number of database used by queue itself
const NUMBER_OF_DATABASES: u32 = 1;
/// The default limit for pagination
const DEFAULT_LIMIT: usize = 20;
/// Database const names for the `IndexScheduler`.
mod db_name {
pub const BATCH_TO_TASKS_MAPPING: &str = "batch-to-tasks-mapping";
@@ -86,7 +89,7 @@ pub struct Query {
impl Default for Query {
fn default() -> Self {
Self {
limit: 20,
limit: DEFAULT_LIMIT,
from: Default::default(),
reverse: Default::default(),
uids: Default::default(),