mirror of
https://github.com/TabbyML/tabby
synced 2024-11-22 17:41:54 +00:00
chore: split prod / dev for job db (#2216)
* chore: split prod / dev for job db * update * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
5027d466ed
commit
a1cae7b38c
@ -15,7 +15,7 @@ vulkan = ["llama-cpp-server/vulkan"]
|
||||
# architecture, enable this feature to compile OpenSSL as part of the build.
|
||||
# See https://docs.rs/openssl/#vendored for more.
|
||||
static-ssl = ['openssl/vendored']
|
||||
prod = ["ee", 'tabby-webserver/prod-db']
|
||||
prod = ["ee", 'tabby-webserver/prod']
|
||||
|
||||
[dependencies]
|
||||
tabby-common = { path = "../tabby-common" }
|
||||
|
@ -6,7 +6,7 @@ authors.workspace = true
|
||||
homepage.workspace = true
|
||||
|
||||
[features]
|
||||
prod-db = []
|
||||
prod = []
|
||||
|
||||
[dependencies]
|
||||
anyhow.workspace = true
|
||||
|
@ -7,16 +7,17 @@ pub fn tabby_ee_root() -> PathBuf {
|
||||
}
|
||||
|
||||
pub fn db_file() -> PathBuf {
|
||||
#[cfg(feature = "prod-db")]
|
||||
{
|
||||
if cfg!(feature = "prod") {
|
||||
tabby_ee_root().join("db.sqlite")
|
||||
}
|
||||
#[cfg(not(feature = "prod-db"))]
|
||||
{
|
||||
} else {
|
||||
tabby_ee_root().join("dev-db.sqlite")
|
||||
}
|
||||
}
|
||||
|
||||
pub fn job_db_file() -> PathBuf {
|
||||
tabby_ee_root().join("job.sqlite")
|
||||
if cfg!(feature = "prod") {
|
||||
tabby_ee_root().join("job.sqlite")
|
||||
} else {
|
||||
tabby_ee_root().join("dev-job.sqlite")
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user