amoghrajesh commented on code in PR #66699:
URL: https://github.com/apache/airflow/pull/66699#discussion_r3240603441


##########
airflow-core/src/airflow/state/metastore.py:
##########
@@ -163,7 +181,13 @@ async def aget(self, scope: StateScope, key: str, *, 
session: AsyncSession | Non
                     assert_never(scope)
 
     async def aset(
-        self, scope: StateScope, key: str, value: str, *, session: 
AsyncSession | None = None
+        self,
+        scope: StateScope,
+        key: str,
+        value: str,
+        *,
+        retention_days: int | None = None,

Review Comment:
   Good catch. Went further and redesigned the interface: `retention_days: int` 
is replaced by `expires_at: datetime | None` throughout the flow now. The 
worker now computes the absolute expiry timestamp before sending to the server, 
so the server just stores it directly. The user-facing API is 
`task_state.set(key, value, retention=timedelta(blah))`



-- 
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