Skip to content

🚀 Feature: Add database cleaner templates #226

@Haimantika

Description

@Haimantika

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!

Metadata

Metadata

Labels

hacktoberfestIssues for Hacktoberfest 2023

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions