[MapProxy] Retrieve percentage of a seeding process
Daniel Degasperi
daniel.degasperi at r3-gis.com
Thu Apr 12 05:02:26 PDT 2018
Hi,
I'm wondering, which is the best practice to retrieve the current
percentage of a seeding process.
First I've tried to use the option "--progress-file", but it seems not
storing the information about the percentage. The output of my example is:
{('demo', 'demo_mbtile_cache', 'epsg3857'): [(0, 1), (0, 1), (0, 1), (0,
1), (0, 1), (0, 1), (0, 1)]}
Then I've tried to pipe the stdout into a log file and extract the
percentage from the last line. This approach was already better, because
I've obtained each 30 seconds a update about the percentage.
But still it does not satisfy my needs. I want to update the percentage
every second to show the current status of the seeding progress via a web
API .
The 30 seconds are automatically assigned, because due piping the stdout
into a log file, the seed binary recognize that it's a tty and adds
automatically the "quiet" option
https://github.com/mapproxy/mapproxy/blob/master/mapproxy/seed/script.py#L188
and quiet option 1 means no verbose ProgressLog
https://github.com/mapproxy/mapproxy/blob/master/mapproxy/seed/script.py#L242
https://github.com/mapproxy/mapproxy/blob/master/mapproxy/seed/util.py#L122
Should i make a wrapper around the seeding process and fake the tty to
false?
Has anybody a better solution?
Best regards,
Daniel
--
ATTENZIONE! Le informazioni contenute
nella presente
e-mail e nei documenti eventualmente
allegati sono
confidenziali. La loro diffusione,
distribuzione e/o
riproduzione da parte di terzi,
senza autorizzazione del
mittente è vietata e può
violare il D. Lgs. 196/2003. In
caso di ricezione per
errore, Vogliate immediatamente
informare il mittente
del messaggio e distruggere la
e-mail.
ACHTUNG! Die in dieser
Nachricht oder
in den beigelegten Dokumenten beinhalteten
Informationen sind streng vertraulich. Ihre
Verbreitung und/oder ihre Wiedergabe durch Dritte ist
ohne Erlaubnis des Absenders verboten und verstößt
gegen
das Legislativdekret 196/2003. Sollten Sie diese
Mitteilung irrtümlicherweise erhalten haben, bitten
wir
Sie uns umgehend zu informieren und anschließend
die
Mitteilung zu vernichten.
WARNING!
This e-mail may contain
confidential and/or privileged
information. If you are
not the intended recipient (or
have received this
e-mail in error) please notify the
sender immediately
and destroy this e-mail. Any
unauthorised copying,
disclousure or distribution of the
material in this
e-mail is strictly forbidden and could
be against the
law (D. Lgs. 196/2003)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20180412/5bb427ee/attachment.html>
More information about the MapProxy
mailing list