asfadmin / Discovery-asf_search

BSD 3-Clause "New" or "Revised" License
124 stars 43 forks source link

add main guard clause to basic multiprocessing download example #297

Closed ZachHoppinen closed 4 months ago

ZachHoppinen commented 4 months ago

Hey not sure if this is an issue specific to my machine but when I copied the minimum batch download example in Notebook 5 for the examples I had the multiprocessing package throw errors that I needed a main guard clause. I figured I would adjust this example to be functional since folks may want to copy it directly.

This should fix this minimum working example to work with 10 processes and not throw errors due to child processes trying to restart the downloads over and over.

An alternative solution would be to just not include the processes = 10 option to avoid these errors in the example.

review-notebook-app[bot] commented 4 months ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

ZachHoppinen commented 4 months ago

Never mind this was just an issue with my multiprocessing package. Tried it on a different machine and it looks great.