document on_delete callback

This commit is contained in:
realaravinth 2021-12-06 12:18:24 +05:30
parent a1f9bcb247
commit efb67a4a85
No known key found for this signature in database
GPG key ID: AD9F0F08E855ED88

View file

@ -67,7 +67,8 @@ pub struct Bucket {
}
impl Bucket {
/// run when bucket is deleted from expiration
/// Run when bucket timer expired at BUCKET_EXPIRY_OFFSET. Runs scheduled jobs in corresponding
/// if they haven't already executed
pub fn on_delete(ctx: &Context, _event_type: NotifyEvent, _event: &str, key_name: &str) {
// TODO: this callback is executed after the bucket is deleted. So all jobs scheduled within
// the bucket are lost. This means, we could end up with stagnent increments in mcaptcha objects