update cargo, fix warnings
All checks were successful
build docker container automatically / build (push) Successful in 3m30s
All checks were successful
build docker container automatically / build (push) Successful in 3m30s
This commit is contained in:
1007
Cargo.lock
generated
1007
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -29,7 +29,9 @@ use diesel::prelude::*;
|
||||
use httpserver::DB;
|
||||
|
||||
|
||||
#[cfg(feature = "server")]
|
||||
use bigdecimal::ToPrimitive;
|
||||
#[cfg(feature = "server")]
|
||||
use bigdecimal::BigDecimal;
|
||||
#[cfg(feature = "server")]
|
||||
use diesel::dsl;
|
||||
|
||||
@ -62,7 +62,7 @@ async fn download_file(id: String) -> Result<FileStream, HttpError> {
|
||||
|
||||
match fstream {
|
||||
Ok(stream) => {
|
||||
DB.with(|pool| diesel::update(&db_file[0]).set(file::downloads.eq(file::downloads + 1))
|
||||
let _ = DB.with(|pool| diesel::update(&db_file[0]).set(file::downloads.eq(file::downloads + 1))
|
||||
.execute(&mut pool.get().unwrap()));
|
||||
Ok(stream)
|
||||
},
|
||||
|
||||
@ -73,8 +73,8 @@ pub async fn scheduled_tasks_loop() {
|
||||
for task in &mut tasks {
|
||||
let mut first_exec = false;
|
||||
|
||||
if let Some(last_exec) = task.last_exec {
|
||||
if(task.interval == Duration::from_secs(0)) {
|
||||
if let Some(_last_exec) = task.last_exec {
|
||||
if task.interval == Duration::from_secs(0) {
|
||||
continue ;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user