Re: Async Call (Func 0.21, Certmaster 0.20)

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

 



I know what you say and I also know that ls command wasn't a good example :)

Anyway, where we are using async call is inside OpenSymbolic, and we have planned to use always async call because inside code we don't know if a specific command is a "long run" or not. As I read inside async documentation (on this ML to be exactly) the difference using nopoll is when the results are shown. if I want to "wait" for a result I don't need nopoll attribute (that will be printed when certmaster receive the anwer), else I need the "nopoll" but, as I seen there's no way to retreive the output string.

As you know we have code symbolic using groovy (java) so it's a bit difficult to call func using a python API (but I know it's the better way). I think for us, the better way to make a func call is using the XML-RPC (wip, I know) but I wanted to try to make this test using async call... Result: FAILED :S

I'll try inside our code without nopoll... but I don't exactly know what could happen... I'll report the results to you...


If you have any other ideas on async let me know
Thanks a lot Michael


Bye
Marco


Michael DeHaan wrote:
Marco Mornati wrote:
Hi all,

I'm testing new features included in func/certmaster 0.20 rpm.

I don't understand (I've read the previous post on ML) if it's possible after an async call, to retrieve the complete output of the command.
I try with this simple command:

[root@bcmmornati noarch]# func "*" call --async --nopoll command run "ls /tmp"
JOB_ID: '1214907784.1717141'

Leave off "--nopoll" and it will poll and provide that info. That being said, there is no reason a short operation like "ls" needs to be invoked async. Async is provided for long-running operations, and soon func will be able to decide what should be invoked with async/poll automatically.
[root@bcmmornati noarch]# func '*' call --jobstatus 1214907784.1717141

The above should provide it if you are using --nopoll. Are you seeing different?

All work correctly, as you can see, but How I can read the list of the file inside my TMP folder? I know that is not an usual command, but could be some test cases where I need to read some output strings and not only the result of run command...

Read some output strings? If you are scripting this, you should probably be using the Python API. We're looking at ways to make this accessible to non-Python apps presently, though parsing the Func command line is a bit fragile and is not recommended.

But... it's a great feature!! Good job!

Bye
Marco





--
Dott. Ing. Mornati Marco
Byte-Code s.r.l
via Antonio Cechov, 1
San Giuliano Milanese (MI)
E-Mail: mmornati@xxxxxxxxxxxxx


_______________________________________________
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