mirror of
https://github.com/0xflux/Wyrm
synced 2026-06-08 10:13:19 +00:00
rm fns no longer needed
This commit is contained in:
+1
-17
@@ -14,7 +14,7 @@ use sqlx::{Pool, Postgres, Row, migrate::Migrator, postgres::PgPoolOptions};
|
||||
use crate::{
|
||||
agents::Agent,
|
||||
app_state::DownloadEndpointData,
|
||||
logging::{log_error_async, print_failed, print_info, print_success},
|
||||
logging::{print_failed, print_info, print_success},
|
||||
};
|
||||
|
||||
const MAX_DB_CONNECTIONS: u32 = 30;
|
||||
@@ -252,22 +252,6 @@ impl Db {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Marks a task as fetched in the db
|
||||
pub async fn mark_task_fetched(&self, task: &Task) -> Result<(), sqlx::Error> {
|
||||
let _ = sqlx::query(
|
||||
r#"
|
||||
UPDATE tasks
|
||||
SET fetched = TRUE
|
||||
WHERE id = $1
|
||||
"#,
|
||||
)
|
||||
.bind(task.id)
|
||||
.execute(&self.pool)
|
||||
.await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Adds a completed task into the `completed_tasks` table which stores the results
|
||||
/// and metadata associated with completed task results, to be used by the client.
|
||||
pub async fn add_completed_task(&self, task: &Task, agent_id: &str) -> Result<(), sqlx::Error> {
|
||||
|
||||
Reference in New Issue
Block a user