From d08a2ae7389a135530454f16d1504250cee189d0 Mon Sep 17 00:00:00 2001 From: shri Date: Mon, 11 Nov 2024 18:06:55 +0100 Subject: [PATCH] Add log --- src/app/domain/opportunities/services.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/app/domain/opportunities/services.py b/src/app/domain/opportunities/services.py index d72115c3..ab457424 100644 --- a/src/app/domain/opportunities/services.py +++ b/src/app/domain/opportunities/services.py @@ -213,8 +213,16 @@ async def scan( .options(selectinload(JobPost.company), undefer(JobPost.body)) ) - job_post_results = await self.repository.session.execute(statement=job_posts_statement) opportunities_audit_log_service = OpportunityAuditLogService(session=self.repository.session) + job_post_results = await self.repository.session.execute(statement=job_posts_statement) + if not job_post_results: + logger.info( + "No new jobs found matching tool stack and date range", + tools_include=icp.tool.include, + tools_exclude=icp.tool.exclude, + last_n_days=last_n_days, + ) + for result in job_post_results: job_post = result[0] try: