-
So i want to expire document but the expire time is different I have 2 documents. The first one must expire after 1 hour but the second expire after 2 hour. How can I do this with beanie? |
Beta Was this translation helpful? Give feedback.
Answered by
kennarddh
Oct 15, 2023
Replies: 1 comment
-
I can do this by using class Settings:
name = "x"
indexes = [
IndexModel(
'expire_at',
name="expire_ttl",
expireAfterSeconds=0
),
] The |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
kennarddh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I can do this by using
The
expire_at
field type isdatetime.datetime