cbeer / fcrepo_wrapper

MIT License
2 stars 10 forks source link

Downloader - ensure progress counter <= total #41

Closed dazza-codes closed 7 years ago

dazza-codes commented 7 years ago

Fix #40

dazza-codes commented 7 years ago

Pushed up the pattern from solr_wrapper as a separate commit for now, can be squashed if it works.

cbeer commented 7 years ago

Shouldn't the SafeProgressBar be ported over too? I think that's where the real magic lies..

dazza-codes commented 7 years ago

OK, using the SafeProgressBar instead of class methods for the procs. The only difference from the solr-solution is using total.to_i <= new_progress because total starts out as nil and nil.to_i => 0.

dazza-codes commented 7 years ago

Seems to be working (it's very slow to download today):

$ bundle exec fcrepo_wrapper clean
cleaning /tmp/fcrepo-webapp-4.7.2-jetty-console...
$ bundle exec fcrepo_wrapper
Starting Fedora 4.7.2 on port 8080 ...
fcrepo-webapp-4.7.2-jetty-console.jar: |===================         | 75% ( ETA: 00:00:34 )