diff --git a/c2/src/db.rs b/c2/src/db.rs index 9ec04a8..acc327e 100644 --- a/c2/src/db.rs +++ b/c2/src/db.rs @@ -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> {