Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Commit

Permalink
Updating Task Heartbeat Struct to actually include job_id (#646)
Browse files Browse the repository at this point in the history
  • Loading branch information
nharper285 authored Mar 9, 2021
1 parent 0a3812d commit d2e4baa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/agent/onefuzz-agent/src/tasks/heartbeat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ pub enum HeartbeatData {
#[derive(Debug, Deserialize, Serialize, Clone)]
struct Heartbeat {
task_id: Uuid,
job_id: Uuid,
machine_id: Uuid,
machine_name: String,
data: Vec<HeartbeatData>,
Expand Down Expand Up @@ -53,13 +54,15 @@ pub async fn init_task_heartbeat(
let task_id = context.state.task_id;
let machine_id = context.state.machine_id;
let machine_name = context.state.machine_name.clone();
let job_id = context.state.job_id;

let data = HeartbeatClient::<TaskContext, _>::drain_current_messages(context.clone());
let _ = context
.queue_client
.enqueue(Heartbeat {
task_id,
data,
job_id,
machine_id,
machine_name,
})
Expand Down

0 comments on commit d2e4baa

Please sign in to comment.