dapr / php-sdk

Dapr SDK for PHP
Apache License 2.0
72 stars 15 forks source link

add support for TTL and time/interval formats in actor timers/reminders #123

Open dmitsh opened 2 years ago

dmitsh commented 2 years ago

This feature has been implemented in Dapr runtime: dapr/dapr#2906

It needed to be available via the SDK.

withinboredom commented 2 years ago

This is already implemented in the SDK via #96 code

dmitsh commented 2 years ago

/reopen

dmitsh commented 2 years ago

@withinboredom , from looking at the code, neither timer nor reminder have TTL in their constructor and logic.

withinboredom commented 2 years ago

Maybe I misunderstood the issue. I thought this was already supported via ISO-8601 via the number of repetitions? How is this different? In PHP, we've used ISO-8601 since the beginning since it's built into PHP and the default way to specify a time span. It did some "best guess" when translating to the golang time lib (which doesn't have a concept of days and years (not every day has 24 hours nor every year 365 days).

dmitsh commented 2 years ago

We have extended timer/reminder scheduling functionality in actors by supporting 3 time formats and adding TTL parameter. The details are here: https://docs.dapr.io/developing-applications/building-blocks/actors/howto-actors/#actor-timers-and-reminders https://www.youtube.com/watch?v=aUAgOlTBVjY#t=33m49s

Let me know if that provides sufficient clarification.

withinboredom commented 2 years ago

Ah, I see what you mean! This is pretty cool. I'll add it in the next release!