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
_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list