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

feat: notify admin to update solvers in the community #618

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Anyitechs
Copy link

This PR schedules a daily job at midnight to notify the admin of a community that there are no solvers in the community. The maximum number of notification messages right now is set to 5, afterwards the community is disabled.

Fixes #314

Copy link
Member

@Catrya Catrya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, did you tested it locally? It's not working properly:

  • This message is not being displayed: Your community ${community.name} doesn't have any solvers. Please add at least one solver to avoid being disabled.
  • Even though the logs say: Community: ${community.name} has been disabled due to lack of solvers. the community is not being disabled. You can continue using it normally.
  • I recommend putting the warning messages to the administrators in the language they have the bot set in, in the yaml of ./locales. You can see as an example at Add cronjob to notify admin about missing solvers (#314) #563

@Anyitechs
Copy link
Author

Hello, did you tested it locally? It's not working properly:

  • This message is not being displayed: Your community ${community.name} doesn't have any solvers. Please add at least one solver to avoid being disabled.
  • Even though the logs say: Community: ${community.name} has been disabled due to lack of solvers. the community is not being disabled. You can continue using it normally.
  • I recommend putting the warning messages to the administrators in the language they have the bot set in, in the yaml of ./locales. You can see as an example at Add cronjob to notify admin about missing solvers (#314) #563

Thank you for the review. I'll work on these feedbacks.

@Anyitechs
Copy link
Author

Anyitechs commented Jan 3, 2025

Hi @Catrya, I've addressed all the feedbacks here. Please have a look and let me know if there're other changes.

Hello, did you tested it locally? It's not working properly:

  • This message is not being displayed: Your community ${community.name} doesn't have any solvers. Please add at least one solver to avoid being disabled.
  • Even though the logs say: Community: ${community.name} has been disabled due to lack of solvers. the community is not being disabled. You can continue using it normally.
  • I recommend putting the warning messages to the administrators in the language they have the bot set in, in the yaml of ./locales. You can see as an example at Add cronjob to notify admin about missing solvers (#314) #563

Copy link
Member

@Catrya Catrya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Anyitechs , much better, it already sends messages to the admins and disables the community. However, I think the message for the admins could be improved so that they know how much time they have to put a new admin.
I think it could be something like this:

Your community ${communityName} does not have any solvers. Please add at least one within X days to prevent the community from being disabled.

Actually the number of notifications that the solver receives before disabling the community is MAX_MESSAGES -1 because it disables it in MAX_MESSAGES, I suggest that it shows that number of notifications before disabling it

I will continue testing and I will tell you if I find any bug, good job!

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

Successfully merging this pull request may close these issues.

Bot message to community admin to update solvers
2 participants