Skip to content
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

feat: checkpointer calculate #16

Merged
merged 6 commits into from
Feb 26, 2024
Merged

feat: checkpointer calculate #16

merged 6 commits into from
Feb 26, 2024

Conversation

dbcfd
Copy link
Contributor

@dbcfd dbcfd commented Feb 26, 2024

No description provided.

pub struct MaterializationCache {
model_id: StreamId,
cli: Box<dyn Ceramic + Send + Sync>,
cache: HashMap<(String, String), ExistingPoints>,
Copy link

Choose a reason for hiding this comment

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

the key would be nicer as a struct with subject/context fields but it's fine

pub async fn calculate(config: web::Data<Config>) -> Result<impl Responder, Error> {
if config
.calculate_active
.load(std::sync::atomic::Ordering::Relaxed)
Copy link

Choose a reason for hiding this comment

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

seems fine but SeqCst might be better if it should really never happen twice (but it's a web api so getting their simultaneously will be really tough)

@dbcfd dbcfd merged commit 1467527 into main Feb 26, 2024
4 checks passed
@dbcfd dbcfd deleted the feat/calculate branch February 26, 2024 21:21
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