diff --git a/contracts/warp-controller/src/contract.rs b/contracts/warp-controller/src/contract.rs index 7c4fddb3..cb74c6a4 100644 --- a/contracts/warp-controller/src/contract.rs +++ b/contracts/warp-controller/src/contract.rs @@ -428,6 +428,7 @@ pub fn reply(mut deps: DepsMut, env: Env, msg: Reply) -> Result Err(ContractError::JobDoesNotExist {}), Some(job) => Ok(Job { id: job.id, + prev_id: job.prev_id, owner: job.owner, last_update_time: Uint64::new(env.block.time.seconds()), name: job.name, @@ -133,6 +134,7 @@ impl JobQueue { None => Err(ContractError::JobDoesNotExist {}), Some(job) => Ok(Job { id: job.id, + prev_id: job.prev_id, owner: job.owner, last_update_time: if added_reward > config.minimum_reward { Uint64::new(env.block.time.seconds()) @@ -169,6 +171,7 @@ impl JobQueue { let new_job = Job { id: job.id, + prev_id: job.prev_id, owner: job.owner, last_update_time: Uint64::new(env.block.time.seconds()), name: job.name, diff --git a/packages/controller/src/job.rs b/packages/controller/src/job.rs index 29746f07..0fc3beb2 100644 --- a/packages/controller/src/job.rs +++ b/packages/controller/src/job.rs @@ -22,6 +22,8 @@ use strum_macros::Display; #[cw_serde] pub struct Job { pub id: Uint64, + // Exist if job is the follow up job of a recurring job + pub prev_id: Option, pub owner: Addr, pub last_update_time: Uint64, pub name: String,