Skip to content

Refine bar aggregators in Rust #2311

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

Merged
merged 1 commit into from
Feb 11, 2025
Merged

Refine bar aggregators in Rust #2311

merged 1 commit into from
Feb 11, 2025

Conversation

faysou
Copy link
Collaborator

@faysou faysou commented Feb 11, 2025

Pull Request

Refine rust bar aggregators

I've also done some changes to TestClock and LiveClock in order to be able to update a time alert without having to pass again a callback, which would be tricky if an object needs to pass a callback to itself.

Type of change

  • New feature (non-breaking change which adds functionality)

How has this change been tested?

Existing tests pass

@cjdsellers cjdsellers changed the title Refine rust bar aggregators Refine bar aggregators in Rust Feb 11, 2025
match callback {
Some(callback_py) => self.callbacks.insert(name_ustr, callback_py),
None => None,
};

let ts_now = self.time.get_time_ns();
// This allows to reuse a time alert without updating the callback, for example for non regular monthly alerts.
Copy link
Member

Choose a reason for hiding this comment

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

We could also push this logic here down to Rust, as I think it is achieving the same thing.
(can be in a follow-up PR.)

@cjdsellers cjdsellers merged commit a0b9eb1 into nautechsystems:develop Feb 11, 2025
12 checks passed
@faysou faysou deleted the aggrs branch February 15, 2025 10:06
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.

2 participants