Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 Feature: Add database cleaner templates #226

Closed
6 tasks
Haimantika opened this issue Oct 9, 2023 · 9 comments · Fixed by #238
Closed
6 tasks

🚀 Feature: Add database cleaner templates #226

Haimantika opened this issue Oct 9, 2023 · 9 comments · Fixed by #238
Assignees
Labels
hacktoberfest Issues for Hacktoberfest 2023

Comments

@Haimantika
Copy link

Haimantika commented Oct 9, 2023

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:

  • Fork & clone Appwrite's templates repository
  • Create a branch feat-implement-database-cleaner-node
  • Write code for the function in folder node/database-cleaner/.
  • Test the function using Appwrite, provide a video.
  • Write a README.md explaining what the function does, how to use it, and customize it. Here is an example.
  • Submit a pull request to our templates repository

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!

@Haimantika Haimantika added the hacktoberfest Issues for Hacktoberfest 2023 label Oct 9, 2023
@dishwasher-detergent
Copy link
Contributor

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

@Haimantika
Copy link
Author

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
Copy link
Contributor

dishwasher-detergent commented Oct 11, 2023

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
Copy link
Author

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
Copy link

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

@dishwasher-detergent
Copy link
Contributor

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

@dishwasher-detergent
Copy link
Contributor

@Haimantika I have a PR out for this. #238

@hdhaliwa
Copy link

@Haimantika I would to contribute for this feature.

@dishwasher-detergent
Copy link
Contributor

@Haimantika I would to contribute for this feature.

There is already an approved PR out for this.

@loks0n loks0n closed this as completed Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Issues for Hacktoberfest 2023
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants