Skip to content

Commit

Permalink
Merge pull request #907 from NamamiShanker/feature/log_time
Browse files Browse the repository at this point in the history
[FEATURE] Log time in success, failed, skipped and data json files

Co-authored-by: NamamiShanker <[email protected]>
  • Loading branch information
surapuramakhil and surapuramakhil authored Nov 22, 2024
2 parents eb3e74a + 218af31 commit 3772d6b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ai_hawk/job_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from itertools import product
from pathlib import Path
from turtle import color
from datetime import datetime

from inputimeout import inputimeout, TimeoutOccurred
from selenium.common.exceptions import NoSuchElementException
Expand Down Expand Up @@ -400,13 +401,15 @@ def write_to_file(self, job : Job, file_name, reason=None):
logger.debug(f"Writing job application result to file: {file_name}")
pdf_path = Path(job.resume_path).resolve()
pdf_path = pdf_path.as_uri()
current_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
data = {
"company": job.company,
"job_title": job.title,
"link": job.link,
"job_recruiter": job.recruiter_link,
"job_location": job.location,
"pdf_path": pdf_path
"pdf_path": pdf_path,
"time": current_time
}

if reason:
Expand Down

0 comments on commit 3772d6b

Please sign in to comment.