Skip to content
Snippets Groups Projects
Unverified Commit e5ccc008 authored by Andrei Eres's avatar Andrei Eres Committed by GitHub
Browse files

Rename QueueEvent::StartWork (#6015)

# Description

When we send `QueueEvent::StartWork`, we have already completed the
execution. This may be a leftover of a previous logic change. Currently,
the name is misleading, so it would be better to rename it to
`FinishWork`.


https://github.com/paritytech/polkadot-sdk/blob/c52675ef/polkadot/node/core/pvf/src/execute/queue.rs#L632-L646


https://github.com/paritytech/polkadot-sdk/blob/c52675ef

/polkadot/node/core/pvf/src/execute/queue.rs#L361-L363

Fixes https://github.com/paritytech/polkadot-sdk/issues/5910

## Integration

Shouldn't affect downstream projects.

---------

Co-authored-by: default avatarGitHub Action <action@github.com>
parent c16ac925
No related merge requests found
Pipeline #500999 waiting for manual action with stages
in 3 minutes and 28 seconds
......@@ -143,7 +143,7 @@ impl Workers {
enum QueueEvent {
Spawn(IdleWorker, WorkerHandle, ExecuteJob),
StartWork(
FinishWork(
Worker,
Result<WorkerInterfaceResponse, WorkerInterfaceError>,
ArtifactId,
......@@ -333,7 +333,7 @@ async fn handle_mux(queue: &mut Queue, event: QueueEvent) {
QueueEvent::Spawn(idle, handle, job) => {
handle_worker_spawned(queue, idle, handle, job);
},
QueueEvent::StartWork(worker, outcome, artifact_id, result_tx) => {
QueueEvent::FinishWork(worker, outcome, artifact_id, result_tx) => {
handle_job_finish(queue, worker, outcome, artifact_id, result_tx).await;
},
}
......@@ -615,7 +615,7 @@ fn assign(queue: &mut Queue, worker: Worker, job: ExecuteJob) {
job.pov,
)
.await;
QueueEvent::StartWork(worker, result, job.artifact.id, job.result_tx)
QueueEvent::FinishWork(worker, result, job.artifact.id, job.result_tx)
}
.boxed(),
);
......
title: Rename QueueEvent::StartWork
doc:
- audience: Node Dev
description: |-
When we send `QueueEvent::StartWork`, we have already completed the execution. Therefore, `QueueEvent::FinishWork` is a better match.
crates:
- name: polkadot-node-core-pvf
bump: patch
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment