Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion crates/zeta/src/zeta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,6 @@ impl Zeta {
zeta_project.next_pending_prediction_id += 1;
let last_request = zeta_project.last_prediction_refresh;

// TODO report cancelled requests like in zeta1
let task = cx.spawn(async move |this, cx| {
if let Some((last_entity, last_timestamp)) = last_request
&& throttle_entity == last_entity
Expand All @@ -1136,6 +1135,12 @@ impl Zeta {
cx.background_executor().timer(timeout).await;
}

this.update(cx, |this, cx| {
this.get_or_init_zeta_project(&project, cx)
.last_prediction_refresh = Some((throttle_entity, Instant::now()));
})
.ok();

let edit_prediction_id = do_refresh(this.clone(), cx).await.log_err().flatten();

// When a prediction completes, remove it from the pending list, and cancel
Expand Down
Loading