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

Refactor currency-per-kill functionality to use a cron job and query events #1534

Closed
takaro-ci-bot bot opened this issue Sep 29, 2024 · 0 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@takaro-ci-bot
Copy link
Contributor

takaro-ci-bot bot commented Sep 29, 2024

Description

Refactor the current currency-per-kill functionality to use a cron job that queries events instead of firing a function for every zombie kill. This will significantly reduce the load on the system and the number of functions being executed.

Requirements/use-cases

  • Implement a cron job that runs every 10 minutes
  • Query all zombie kill events for the last 10 minutes
  • Calculate and distribute currency based on the queried events
  • Ensure this method is more efficient than the current implementation

Implementation details

  • Use the events API to query zombie kill events
  • Utilize the new 'greater than' operation for event searching (e.g., created_at greater than 10 minutes ago)
  • Aggregate kills per player and distribute currency accordingly
  • Consider implementing this as a built-in module for easy user adoption

Benefits

  • Reduced system load
  • Lower function execution count
  • More scalable solution for high-traffic servers
  • Potentially lower costs for users

Possible duplicates:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants