Open-Assistant icon indicating copy to clipboard operation
Open-Assistant copied to clipboard

send flagged message notification to discord

Open notmd opened this issue 2 years ago • 6 comments

Send a notification to Discord so the mod team can quickly take action. This is a temporal workaround for https://github.com/LAION-AI/Open-Assistant/issues/968. Also we don't need a UI for it.

image

notmd avatar Apr 17 '23 03:04 notmd

:x: pre-commit failed. Please run pre-commit run --all-files locally and commit the changes. Find more information in the repository's CONTRIBUTING.md

github-actions[bot] avatar Apr 17 '23 03:04 github-actions[bot]

:x: pre-commit failed. Please run pre-commit run --all-files locally and commit the changes. Find more information in the repository's CONTRIBUTING.md

github-actions[bot] avatar Apr 17 '23 05:04 github-actions[bot]

Thanks @notmd :). while you are at it. was thinking if you could

  1. move the sending to a celery task (check scheduled_tasks.py).
  2. save the flagged message ids in Redis list with a "date in the name" and TTL=24hrs
  3. have a scheduled task in celery that will compose a discord message with the number of flagged messages, their IDs etc .. and send them every 4hrs say (configurable)

This would help the mods even when #968 is implemented and also not overwhelm discord with all the flagged messages.

@andreaskoepf what is your opinion?

melvinebenezer avatar Apr 17 '23 07:04 melvinebenezer

Thank, just thinking about moving it to celery too. But 4h is so long. I saw many times the tree grow so fast, new children might come in less than 1h. Also, notification means I want to send it immediately so the mods can take action quickly so we don't waste contributor effort. Is it ok to have the celery tasks run every 5 min or less than that? Discord allow to send up to 50 message per sec or 10000 per 10 mins.

notmd avatar Apr 17 '23 07:04 notmd

@notmd yes, I agree. 4hrs is long. Yes, you can have celery tasks run every 5 mins or lesser.

melvinebenezer avatar Apr 18 '23 08:04 melvinebenezer

Will need a follow-up PR for the celery task

melvinebenezer avatar May 01 '23 02:05 melvinebenezer