Execute a method on service startup

Hello folks!
Tried to search on auto start / autostart but got nothing…

Imagine that I have a service using some extension for example a chat bot message entrypoint.

So when smbd send a message service’s method is fired via this entrypoint.

But what if I need to send a message first? I mean not in reaction but as soon I the service is started.

Is there a method if keeping usage of nameko run … ?

Thanks :slight_smile:

I found the following method.
I use Supervisord to run Nameko services.
I use Supervisord eventlistener which executes nameko shell schript which calls service rpc method to perform startup procedures.

I found one more solution for this - “Once” entrypoint from here - https://github.com/topiaruss/nameko-chat/blob/master/chat/entrypoints/once.py
Simple and nice approach :slight_smile: