Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel instances #580

Open
m0nkge opened this issue Sep 19, 2021 · 2 comments
Open

Parallel instances #580

m0nkge opened this issue Sep 19, 2021 · 2 comments

Comments

@m0nkge
Copy link

m0nkge commented Sep 19, 2021

When running unoconv in a loop as follows everything works OK but its slow.

for i in *.odt ; do R=`unoconv --stdout -f text $i | grep -w "word" -c` ; echo $R $i; done

Attempting to speed it up, I spawned each iteration in the background.

LOG="/tmp/odtresults-`date  +'%Y%m%d%H%M%S'`.txt"
for i in *.odt ; do
        (
                R=`unoconv --stdout -f text  $i | grep -w -o "word" | wc -l`
                echo $R $i >>$LOG
        ) &
done

but this doesnt work as expected. I get a bunch of

Error: Unable to connect or start own listener. Aborting.

errors and a whole lot of stuck processes.

How can I get this to work?

Cheers.

@m0nkge
Copy link
Author

m0nkge commented Sep 19, 2021

Ok, I saw your note about starting the listener beforehand and I used your example.

adding

unoconv -l &
sleep 15s

fixes my problem. But I'd like to eliminate the 15s delay if possible. How can I know when the listener is ready?

@regebro
Copy link
Member

regebro commented Nov 12, 2021

I don't think you can. But a 15 second delay seems excessive? It's just a question of LibreOffice to start, does that take 15 seconds for you?

Unoconv does not support parallel instances. Unoserver might, in theory.
https://github.com/unoconv/unoserver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants