Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/env-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
| `TRUSTD_DB_PASSWORD` | Database password | `trustify` |
| `TRUSTD_DB_PORT` | Database port | `5432` |
| `TRUSTD_DB_USER` | Database username | `postgres` |
| `TRUSTD_GC_FREQ` | How often database garbage collection runs (humantime) | `1h` |
| `TRUSTD_GC_FREQ` | Database garbage collection frequency [disabled by default] (humantime) | `0s` |
| `TRUSTD_ISSUER_URL` | Issuer URL for `--devmode` | `http://localhost:8090/realms/trustify` |
| `TRUSTD_MAX_CACHE_SIZE` | Maximum size of the graph cache. | `200 MiB` |
| `TRUSTD_S3_ACCESS_KEY` | S3 access key | |
Expand Down
4 changes: 2 additions & 2 deletions server/src/profile/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use trustify_module_storage::{
use trustify_module_ui::{UI, endpoints::UiResources};
use utoipa::openapi::{Info, License};

const GC_FREQ: Duration = Duration::from_secs(60 * 60);
const GC_FREQ: Duration = Duration::from_secs(0);
const ENV_GC_FREQ: &str = "TRUSTD_GC_FREQ";

/// Run the API server
Expand Down Expand Up @@ -379,7 +379,7 @@ fn schedule_db_tasks(db: db::Database) {
_ => GC_FREQ,
};
if freq < Duration::from_secs(1) {
log::warn!("GC is disabled; to enable, set {ENV_GC_FREQ} to at least 1s");
log::warn!("Garbage collection is disabled; to enable, set {ENV_GC_FREQ} to at least 1s");
return;
}
log::info!("GC frequency set to {}", humantime::Duration::from(freq));
Expand Down