Re: Forcing async mode when calling remote methods

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Krzysztof A. Adamski wrote:

Ah, this is what I was talking about in my other email, good :)

I've created very small patch that let us configure which methods
should be called in async mode when using 'func' command line tool.
List of methods can be configured in /etc/func/async_methods.conf file,
which looks like this by default:

[main]
force_async = command.run, yumcmd.update, virt.install

How about a syntax a bit more like this? We could make this more generic so we might be able to pass in other hints later. Perhaps call it /etc/func/methods.conf

[command]
run = async

[virt]
install = async, not_on_tuesday

[yumcmd]
update = async

I don't have any good ideas for what "hints" might be, but that strikes me as being a bit more editable if there are later 50 methods in there.


So now if you call one of this three methods, it will be called in
async mode with polling. It wont timeout but you also wont see the
difference in how it's called and how it returns.

The patch can be found at:
http://github.com/kadamski/func/commit/a5929a01854dd53828e10008b68763c3959632ec

Any comments?

That patch looks remarkably short, nice :)

I'd possibly consider moving the config file to something like the above, but otherwise, great!
_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list

_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list

[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux