Change index interval, add slug to search documents (#110)

* Change index interval, add slug to search documents

* Allow the removal of '@' for slug get

* Fix

* Remove name and rename side type

* Run prepare
This commit is contained in:
Geometrically
2020-12-13 18:10:58 -07:00
committed by GitHub
parent df5684a9f8
commit f0b73fd696
14 changed files with 486 additions and 533 deletions

View File

@@ -36,8 +36,12 @@ pub fn schedule_versions(
pool: sqlx::Pool<sqlx::Postgres>,
skip_initial: bool,
) {
// Check mojang's versions every 6 hours
let version_index_interval = std::time::Duration::from_secs(60 * 60 * 6);
let version_index_interval = std::time::Duration::from_secs(
dotenv::var("VERSION_INDEX_INTERVAL")
.ok()
.map(|i| i.parse().unwrap())
.unwrap_or(1800),
);
let mut skip = skip_initial;
scheduler.run(version_index_interval, move || {