From 1558a2817081d9110eff20f5d429125e460d9a81 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 13 Nov 2020 17:21:57 +0100 Subject: Add uuid field to "job" table Signed-off-by: Matthias Beyer --- src/db/models/job.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/db') diff --git a/src/db/models/job.rs b/src/db/models/job.rs index fd3b862..12fba7b 100644 --- a/src/db/models/job.rs +++ b/src/db/models/job.rs @@ -19,6 +19,7 @@ pub struct Job { pub container_hash: String, pub script_text: String, pub log_text: String, + pub uuid: ::uuid::Uuid, } #[derive(Debug, Insertable)] @@ -31,10 +32,12 @@ struct NewJob<'a> { pub container_hash: &'a str, pub script_text: &'a str, pub log_text: &'a str, + pub uuid: &'a ::uuid::Uuid, } impl Job { pub fn create(database_connection: &PgConnection, + job_uuid: &::uuid::Uuid, submit: &Submit, endpoint: &Endpoint, package: &Package, @@ -44,6 +47,7 @@ impl Job { log: &str, ) -> Result<()> { let new_job = NewJob { + uuid: job_uuid, submit_id: submit.id, endpoint_id: endpoint.id, package_id: package.id, -- cgit v1.2.3