core icon indicating copy to clipboard operation
core copied to clipboard

Push notifications and Cron system

Open pieroit opened this issue 1 year ago • 3 comments

To allow real science fiction, there should be the possibility for a plugin to extend:

  • Push notifications: reply to websocket messages (eventually http endpoints) send by external system, and the reply goes to human. This breaks the standard cycle clientA - bot - clientA to become clientB - bot - clientA.
  • Cron: scheduled executions of hooks

How do we let the cat cover these use cases? We're open to suggestions

pieroit avatar Oct 17 '23 21:10 pieroit

Hi eveybody, I enjoy to code cron hook, my target is to get something like that:

put a schedule.py file to the following https://github.com/cheshire-cat-ai/core/tree/main/core/cat/mad_hatter/core_plugin/hooks

than implement a list of schedule hook like these

  • schedule_every_hour
  • schedule_every_minute
  • schedule_every_day

if someone is curious about that follow me to my fork and the branch https://github.com/francescobianco/cheshire-cat/blob/async-behaviour-plugin/core/cat/mad_hatter/core_plugin/hooks/schedule.py

By the way plugin developer can build plugin with async behaviors

francescobianco avatar Nov 17 '23 19:11 francescobianco

@francescobianco love this thanks! Having those as hooks is a great idea

pieroit avatar Nov 17 '23 19:11 pieroit

This lib may ne helpful https://schedule.readthedocs.io/en/stable/examples.html#examples

pieroit avatar Nov 17 '23 20:11 pieroit

WhiteRabbit class merged into develop

pieroit avatar May 24 '24 18:05 pieroit