diff options
author | iximeow <me@iximeow.net> | 2023-07-02 16:20:11 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2023-07-02 16:20:11 -0700 |
commit | 78c5345541a49881f85ea1b4f82429fef070c29c (patch) | |
tree | b491c8c928e7e647993e58a4c99756bdb134fc7d | |
parent | a876e5dfec331c1b6a921c9dd1b79d9d6917ebbd (diff) |
silly deadlock bug, sql typos
-rw-r--r-- | src/dbctx.rs | 3 | ||||
-rw-r--r-- | src/sql.rs | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/dbctx.rs b/src/dbctx.rs index 0b1b7ad..049a490 100644 --- a/src/dbctx.rs +++ b/src/dbctx.rs @@ -615,8 +615,7 @@ impl DbCtx { ) .expect("can insert"); - self.conn.lock() - .unwrap() + conn .query_row( "select id from hosts where \ ( \ @@ -118,7 +118,7 @@ pub const CREATE_RUNS_TABLE: &'static str = "\ pub const CREATE_HOSTS_TABLE: &'static str = "\ CREATE TABLE IF NOT EXISTS hosts (id INTEGER PRIMARY KEY AUTOINCREMENT, hostname TEXT, - cpu_vendor TEXT, + cpu_vendor_id TEXT, cpu_model_name TEXT, cpu_family TEXT, cpu_model TEXT, @@ -128,7 +128,7 @@ pub const CREATE_HOSTS_TABLE: &'static str = "\ arch TEXT, family TEXT, os TEXT, - UNIQUE(hostname, cpu_vendor, cpu_model_name, cpu_family, cpu_model, cpu_microcode, cpu_cores, mem_total, arch, family, os));"; + UNIQUE(hostname, cpu_vendor_id, cpu_model_name, cpu_family, cpu_model, cpu_microcode, cpu_cores, mem_total, arch, family, os));"; pub const CREATE_REMOTES_INDEX: &'static str = "\ CREATE INDEX IF NOT EXISTS 'repo_to_remote' ON remotes(repo_id);"; |