<div dir="ltr">Hi,<div><br></div><div>I'm wondering, which is the best practice to retrieve the current percentage of a seeding process.</div><div><br></div><div>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:</div><div>{('demo', 'demo_mbtile_cache', 'epsg3857'): [(0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1), (0, 1)]}<br></div><div><br></div><div>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.</div><div><br></div><div>But still it does not satisfy my needs. I want to update the percentage every second to show <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">the current status of the seeding progress</span> via a web API .</div><div><br></div><div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">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<br><a href="https://github.com/mapproxy/mapproxy/blob/master/mapproxy/seed/script.py#L188">https://github.com/mapproxy/mapproxy/blob/master/mapproxy/seed/script.py#L188</a><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">and quiet option 1 means no verbose ProgressLog</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><a href="https://github.com/mapproxy/mapproxy/blob/master/mapproxy/seed/script.py#L242">https://github.com/mapproxy/mapproxy/blob/master/mapproxy/seed/script.py#L242</a><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><a href="https://github.com/mapproxy/mapproxy/blob/master/mapproxy/seed/util.py#L122">https://github.com/mapproxy/mapproxy/blob/master/mapproxy/seed/util.py#L122</a></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">Should i make a wrapper around the seeding process and fake the tty to false?</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">Has anybody a better solution?</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><br></div></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">Best regards,</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">Daniel</div></div>

<br>
<font color="#888888" face="DejaVu
                  Sans,Verdana,Arial,Helvetica,sans-serif" size="1"><strong>ATTENZIONE!</strong> 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.<br>
                  <br>
                  <strong>ACHTUNG!</strong> 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.<br>
                  <br>
                  <strong>WARNING!</strong> 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)<br></font>