Add enqueue_at to Task
...in preparation for delayed enqueuing.
@@ -25,6 +25,7 @@ pub struct Task {
pub id: usize,
pub command: String,
pub path: String,
+ pub enqueue_at: Option<DateTime<Local>>,
pub status: TaskStatus,
pub prev_status: TaskStatus,
pub exit_code: Option<i32>,
@@ -40,6 +41,7 @@ impl Task {
id: 0,
command: command,
path: path,
+ enqueue_at: None,
status: starting_status.clone(),
prev_status: starting_status,
exit_code: None,
@@ -55,6 +57,7 @@ impl Task {
id: 0,
command: task.command.clone(),
path: task.path.clone(),
+ enqueue_at: task.enqueue_at,
status: TaskStatus::Queued,
prev_status: TaskStatus::Queued,
exit_code: None,
