From 0abc781a36c56edfb99a15b2474b0abd2e4edbe4 Mon Sep 17 00:00:00 2001 From: simke9445 Date: Fri, 12 Jan 2024 16:39:18 +0100 Subject: [PATCH] improvements --- contracts/warp-controller/src/query/job.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/contracts/warp-controller/src/query/job.rs b/contracts/warp-controller/src/query/job.rs index c0ef8be..4af58e7 100644 --- a/contracts/warp-controller/src/query/job.rs +++ b/contracts/warp-controller/src/query/job.rs @@ -47,8 +47,9 @@ pub fn query_jobs(deps: Deps, env: Env, data: QueryJobsMsg) -> StdResult, + owner: Addr, job_status: Option, - start_after: Option<(String, u64)>, + start_after: Option, limit: usize, ) -> StdResult { - let start = start_after.map(Bound::inclusive); + let start = start_after.map(Bound::exclusive); let map = if job_status.is_some() && job_status.clone().unwrap() != JobStatus::Pending { FINISHED_JOBS() } else { @@ -164,6 +166,7 @@ pub fn query_jobs_by_owner( let infos = map .idx .owner + .prefix(owner.to_string()) .range(deps.storage, start, None, Order::Ascending) .filter(|h| { resolve_filters(