You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I am exploring prefect for one of my projects. I want to send notification emails to my users summarizing a set of activities. Rather than sending an individual email for each activity, I want to batch them together. The requirements are as follows:
The system must trigger an email flow as soon as either condition is met
If the user receives 10 activities before the 1-minute window elapses, an email is sent immediately.
If fewer than 10 activities occur within the minute, the email is sent once the minute is over.
Once an email is sent, the batch of activities is cleared. New activities will start accumulating in a fresh batch, restarting the fixed time interval and activity count conditions.
can you send me a sample implementation for my requirement?
Note: I want to store the activities list as a variables (not in any queue or in memory)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey, I am exploring prefect for one of my projects. I want to send notification emails to my users summarizing a set of activities. Rather than sending an individual email for each activity, I want to batch them together. The requirements are as follows:
The system must trigger an email flow as soon as either condition is met
Once an email is sent, the batch of activities is cleared. New activities will start accumulating in a fresh batch, restarting the fixed time interval and activity count conditions.
can you send me a sample implementation for my requirement?
Note: I want to store the activities list as a variables (not in any queue or in memory)
Beta Was this translation helpful? Give feedback.
All reactions