Skip to content

Conversation

@0xphilipp
Copy link
Contributor

No description provided.

.take(limit)
.collect::<StdResult<Vec<_>>>()?;

let mut jobs = vec![];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also optimized this to do it directly in the map to not copy the whole list again and reiterate it.

let infos = map
.range(deps.storage, start, None, Order::Ascending)
.filter(|h| {
resolve_filters(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of cloning everything, it could be better to just borrow things. For small structs cloning is better, but not sure about strings etc.

pub condition_status: Option<bool>,
pub start_after: Option<JobIndex>,
pub limit: Option<u32>,
pub use_id_order: Option<bool>,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this is set to true and no ids provided, the order will be by id ascending

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant