summaryrefslogtreecommitdiffstats
path: root/src/db
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-11-13 17:21:57 +0100
committerMatthias Beyer <mail@beyermatthias.de>2020-11-13 17:25:25 +0100
commit1558a2817081d9110eff20f5d429125e460d9a81 (patch)
tree52f5cddc9b4e8f248f5367601074e9af76019821 /src/db
parent4eca99a67c87dde25024877b8fc390ab67dde23c (diff)
Add uuid field to "job" table
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/db')
-rw-r--r--src/db/models/job.rs4
1 files changed, 4 insertions, 0 deletions
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,