Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
iwupdate
parsan99
Hi
I use iwupdate with -r option from a custom CGI (called by a custom menu item) . I need to display the files processed by iwupdate as the work progresses. I display the output of iwupdate in a HTML page using Content-type: multipart/x-mixed-replace;boundary=NEXT
It looks like iwupdate reports the list of files only at the end of processing (even on command line) . Is that right?. Is there any workaround to this?
Many Thanks
Find more posts tagged with
Comments
Migrateduser
Not sure what you mean by this? What do you mean by "at the end of processing?"
bw
Bob Walden [bob.walden@interwoven.com]
Interwoven Education Group
IM: Yahoo, MSN bob_walden
parsan99
Hi Bob
By "end of processing" I mean "End of Operation" ie it doesnt print the files as it progresses with every file. It seems to print the files after the entire operation is complete.
Thanks
Migrateduser
Well, I'm not sure--it prints out a list of files, who's to say if they get printed out as they are processed, or immediately after? However, it's likely that you're correct, as the underlying code in OpenAPI that does an update does operate in batch mode, returning a collection of processed files only when it's done.
Why would you want to change this? If you need to do some sort of one-file-at-a-time update and confirm, you could do it with iwlistmod to grab an array of file names, then hand them to iwupdate one at a time in your own code. But tres inefficient.
bw
Bob Walden [bob.walden@interwoven.com]
Interwoven Education Group
IM: Yahoo, MSN bob_walden
Adam Stoller
Even if it isn't batching the operation - the output is coming through STDOUT which is usually buffered by the system - so you won't see results in real-time anyway.
--fish
(Interwoven Senior Technical Consultant)
parsan99
The reason I want to see some realtime output from iwupdate, is the user would be waiting with a screen until the operation finishes. I could show some kind of processing image for that time frame but it makes more sense to show the files updated. It is just a display thing. It neednt be interactive (like letting the users make a selection).
Thanks
akshathp
So why you cannot use Bob's suggestion about feeding group of files one by one to iwupdate in your custom script?That way you can also print not only the filename but also any message you want to display to user.
Hope this helps!
Akshat Pramod Sharma
Interwoven Inc.
parsan99
Thanks everyone.. Will try that out..
Adam Stoller
Food for thought:
If performance is an issue (maybe it is, maybe it isn't) - feeding one file at a time through iwupdate will be horrible (you pay the cost of starting up a shell for each invokation).
Doing it on a [major] directory-by-directory basis should be better (fewer invokations, and you can present the output between each one) but if you have any files at the top level, you will still have to run iwupdate from there after all the sub-directories are done.
If you want to maximize performance without subjecting your user to a blank screen - you can always throw some text to the screen saying that you are processing such-and-such workarea, please stand by ... (marginally better than a blank screen).
If you're on Unix - you could probably fork the iwupdate process and do peridoc updates to the screen while waiting for the results to come back (maximized performance, better than a blank or static screen, but more complex code)
I cannot remember if you can fork processes on Windows (I know it used to not be possible, can't remember if it still doesn't work)
--fish
(Interwoven Senior Technical Consultant)
Migrateduser
Is there a way to specify multiple source files with one destination on iwupdate? From the documentation, it looks like this is a possibility, but it doesn't implicitly say so. Really, the only clue that I have that this might be possible is the "+" after the src_vpath.
- Jason
james1
Yes. Give it a try, it will probably do what you expect.
-- James
--
James H Koh
Interwoven Engineering