Skip to content

Commit 3f2ff93

Browse files
committed
docs: clarify the lockSecs serialization alias on RequestQueueHead.lock_time
1 parent 7d3997c commit 3f2ff93

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/apify/storage_clients/_apify/_models.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,15 @@ class RequestQueueHead(BaseModel):
4848
queue_modified_at: datetime
4949
"""The timestamp when the queue was last modified."""
5050

51-
# Accept both `lockSecs` (the lock duration in seconds, the key the API actually sends) and the camelCase
52-
# `lockTime` that `to_camel` derives from the field name. Serialization keeps emitting `lockSecs` for backward
53-
# compatibility. The field is named `lock_time` because Pydantic parses the value into a `timedelta`.
5451
lock_time: Annotated[
5552
timedelta | None,
5653
Field(validation_alias=AliasChoices('lockSecs', 'lockTime'), serialization_alias='lockSecs'),
5754
] = None
58-
"""The duration for which the returned requests are locked and cannot be processed by other clients."""
55+
"""The duration for which the returned requests are locked and cannot be processed by other clients.
56+
57+
The platform's API names this field `lockSecs`, so it is serialized under that alias instead of the
58+
`lockTime` that `to_camel` would derive from the field name.
59+
"""
5960

6061
queue_has_locked_requests: bool | None = False
6162
"""Indicates whether the queue contains any locked requests."""

0 commit comments

Comments
 (0)