This commit is contained in:
+7
-2
@@ -542,8 +542,11 @@ async def manual_scan(background_tasks: BackgroundTasks, path: Optional[str] = N
|
||||
|
||||
async def run_scan():
|
||||
from datetime import datetime
|
||||
import time
|
||||
start_time = datetime.now()
|
||||
print(f"🚀 MANUAL SCAN STARTED: {scan_type} scan initiated at {start_time.strftime('%Y-%m-%d %H:%M:%S')}")
|
||||
# Get local time for display
|
||||
local_start = datetime.fromtimestamp(start_time.timestamp())
|
||||
print(f"🚀 MANUAL SCAN STARTED: {scan_type} scan initiated at {local_start.strftime('%Y-%m-%d %H:%M:%S')} (local time)")
|
||||
|
||||
paths_to_scan = []
|
||||
if path:
|
||||
@@ -629,7 +632,9 @@ async def manual_scan(background_tasks: BackgroundTasks, path: Optional[str] = N
|
||||
end_time = datetime.now()
|
||||
duration = end_time - start_time
|
||||
duration_str = str(duration).split('.')[0] # Remove microseconds
|
||||
print(f"✅ MANUAL SCAN COMPLETED: {scan_type} scan finished at {end_time.strftime('%Y-%m-%d %H:%M:%S')}")
|
||||
# Get local time for display
|
||||
local_end = datetime.fromtimestamp(end_time.timestamp())
|
||||
print(f"✅ MANUAL SCAN COMPLETED: {scan_type} scan finished at {local_end.strftime('%Y-%m-%d %H:%M:%S')} (local time)")
|
||||
print(f"⏱️ MANUAL SCAN DURATION: {duration_str} (total time: {duration.total_seconds():.1f} seconds)")
|
||||
|
||||
background_tasks.add_task(run_scan)
|
||||
|
||||
Reference in New Issue
Block a user