Skip to content

Conversation

@inhumanitas
Copy link
Contributor

Accept 'log_channel' as parameter
When parameter is not passed use default value

@keto
Copy link
Member

keto commented Apr 24, 2018

Where would this log_channel parameter come from? AFAIK only the WebhookMapping fields and the msg is passed to the process when launching.

I think it might be better if you just modify the process definition in you deployment and set what ever channel you want there. It is really simple process and adding configuration options just makes it more complicated.

Currently the process definitions are not marked as configuration files in the RPM, so you need to copy them somewhere else and point the options in webhooks.conf [processes] section to correct location, so that your modifications are not overwritten when updating.

@inhumanitas
Copy link
Contributor Author

inhumanitas commented Apr 25, 2018

For participants in boss-launcher-webhook area, it will be great to have ability to send notifications by simple calling:

from webhook_launcher.app.boss import launch_notify
launch_notify({'log_channel': irc_channel_name, 'msg': msg})

I want to send important notification from participant to irc, i can make a separate process, but for another participant new process will be needed, it is not a good idea.

If there is no security issue

@lbt
Copy link
Member

lbt commented Apr 26, 2018

It seems there are a few things going on :)

My main concern here is that participants should (almost) never launch new processes or call other participants. Tracing process flows is hard enough without launching new processes just to send messages to irc.

The purpose of a process is to define a flow of execution and how to handle participant responses (email irc etc) so having the participant decide this is a bit dubious.

If a participant needs to contact the irc channel then it should call the web service directly. Ideally this would be done via a simple library.

So because that's the reason for the change then I would say no.

If this was part of a bigger change that collected webhook configuration into one place then that may make sense - but I'd object to any participant that then happened to use the launch_notify() 'private' webhook method ;)

@inhumanitas
Copy link
Contributor Author

Thank you, i got it.
Now refactored to use *.pdef parameters from *.conf file, to allow parametrize pdef from file

@inhumanitas
Copy link
Contributor Author

inhumanitas commented May 8, 2018

There are "variables" parameter in RuoteAMQP.launcher.Launcher#launch

But couldn't find out how to use that variables in pdef process, any idea?

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.

3 participants