appwrite / templates

Templates for Appwrite Functions ⚡️🌩️
https://appwrite.io
MIT License
105 stars 81 forks source link

🚀 Feature: Add database cleaner templates #226

Closed Haimantika closed 4 months ago

Haimantika commented 9 months ago

Appwrite Functions allow you to extend and customize your Appwrite server functionality by executing your custom code. 🤩 You can learn more at our official Appwrite Functions docs.

What you’re building

Your task is to implement the database cleaner template in Node.js.

Database cleaner integrates with Appwrite Databases and removes old documents from the collections older than X number of days, as configured by the RETENTION_PERIOD_DAYS environment variable. The Database cleaner should be scheduled using CRON, defaulting to running at 1:00 AM every day.

This can be useful when you have apps that receive a lot of write traffic but don’t need super long retention, such as live location updates of IoT devices or chat logs in a video game.

Your function’s implementation should be similar to other Node.js function templates in code format and style. Make sure to follow our contributing guide.

Tasks summary:

If you need any help, contact us on our Discord server.

Are you ready to work on this issue? 🤔 Let us know, and we will assign it to you 😊

Happy coding!

dishwasher-detergent commented 9 months ago

I'd like to work on this issue. :)

Haimantika commented 9 months ago

I'd like to work on this issue. :)

Hi @dishwasher-detergent have assigned the issue to you! Thank you for showing interest in contributing to Appwrite! Happy Hacktoberfest 🎃

Notes:

Please update us with your progress every 3 days, so that we know that you are working on it. Join us on Discord - https://appwrite.io/discord to chat about Hacktoberfest and Appwrite!

dishwasher-detergent commented 9 months ago

Are we wanting to explicitly tell it what collection to clean based on an environment variable, or are we wanting this to just clean all collections in a project?

Haimantika commented 9 months ago

Are we wanting to explicitly tell it what collection to clean based on an environment variable, or are we wanting this to just clean all collections in a project?

As the description says, we want it to clean the collections

Gilbishkosma commented 9 months ago

hi @Haimantika , i would like to work on this in case @dishwasher-detergent drops.

dishwasher-detergent commented 8 months ago

I've got this mostly complete. I plan to finish by the end of the weekend.

dishwasher-detergent commented 8 months ago

@Haimantika I have a PR out for this. https://github.com/appwrite/templates/pull/238

hdhaliwa commented 4 months ago

@Haimantika I would to contribute for this feature.

dishwasher-detergent commented 4 months ago

@Haimantika I would to contribute for this feature.

There is already an approved PR out for this.