hussein-awala commented on code in PR #34231:
URL: https://github.com/apache/airflow/pull/34231#discussion_r1342131680


##########
airflow/providers/cncf/kubernetes/triggers/pod.py:
##########
@@ -182,7 +184,8 @@ async def run(self) -> AsyncIterator[TriggerEvent]:  # 
type: ignore[override]
                                 }
                             )
                             return
-
+                        else:
+                            await asyncio.sleep(self.startup_check_interval)
                     self.log.info("Sleeping for %s seconds.", 
self.poll_interval)
                     await asyncio.sleep(self.poll_interval)

Review Comment:
   We need to add an else to avoid sleeping twice (`startup_check_interval` and 
`poll_interval`)
   ```suggestion
                               self.log.info("Sleeping for %s seconds.", 
self.startup_check_interval)
                               await asyncio.sleep(self.startup_check_interval)
                       else:
                           self.log.info("Sleeping for %s seconds.", 
self.poll_interval)
                           await asyncio.sleep(self.poll_interval)
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to