Hi,
How can I handle several clients chatting with the bot and not get either in a queue or mixing conversations?
Scenario:
having 4 or more persons chatting thru Telegram with the bot.
I am using the weather bot as a trial
Also, how should I size the server to manage the simultaneous conversations
@akelad, lets assume that all the 4 users requesting bot to trigger a function at a time in actions.py which will take 3+ minutes to execute for each request, how we can queue that requests so that my bot will be freed up to respond the simple 5th user query? is it already taken care by Rasa core or i need to include RabitMQ or Celery in my actions.py?
I have implemented asynchronous action task handler using redis and Celery setup in actions.py but with a challenge.
class Blackout(Action):
def name(self):
return 'action_blackout'
def run(self, dispatcher, tracker, domain):
if tracker.get_slot("hostname") is None:
db_or_hostname = tracker.get_slot("dbname")
else:
db_or_hostname = tracker.get_slot("hostname")
usrid = slackitems(tracker)
tgtname = db_or_hostname
total_hours = tracker.get_slot("duration")
comments = tracker.get_slot("blackout_comments")
if tracker.get_slot("hostname") is None:
argmnt = "database"
else:
argmnt = "host"
final_msg = blackoutfn.delay(dispatcher,cxpassword,usrid,tgtname,total_hours,comments,argmnt)
With out sending dispatcher to celery blackoutfn function , bot can’t send message back to slack. But sending dispatcher to celery blackoutfn throwing up “kombu.exceptions.EncodeError: Object of type CollectingDispatcher is not JSON serializable”.