How to have Firebase automatically delete values older than 30 minutes

后端 未结 1 645
情书的邮戳
情书的邮戳 2020-12-10 09:30

I have a Swift/iOS application that creates/holds data something like this:

buyer_name: \"john@gmail.com\"
seller_name: \"tom@gmail.com\"
price: \"20.00\"

相关标签:
1条回答
  • 2020-12-10 10:33

    You can use Cloud Functions for Firebase and set up a cron job that runs, say, every five minutes and checks for timestamps older than 30 minutes.

    As Will commented, that blog post is useful to learn about scheduling Cloud Functions. Here are some other useful resources to get you started:

    Getting Started with Cloud Functions for Firebase - YouTube

    Cloud Functions for Firebase Documentation

    Cloud Functions Samples

    Timing Cloud Functions for Firebase using an HTTP Trigger and Cron - YouTube

    0 讨论(0)
提交回复
热议问题