forked from xtream1101/humblebundle-downloader
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Multiprocessing with process safe file writes. #8
Open
Greeley
wants to merge
22
commits into
missytake:main
Choose a base branch
from
Greeley:merge_missytake
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- lambda to be pedantic about the type map expects. - added exception package with InvalidCookieException.py - added multiprocess package with exorcise_daemons.py - exorcise_daemons#ExorcistPool creates multiprocessing pools without creating daemons - mapped self._process_order_id to multiprocess pool of purchase_keys.
- updated trove_base_url
- Downloading: basename now prints to avoid so much console spam. - join the pool to finalize it properly.
- created CacheData class in cache.py - read cache data in for every write.
Feature/multi process
_get_trove_products
- caching with json is pretty crazy, so I've switched it to a csv. - added _strtobool - added _strtonone will be useful when converting old json cache - cache object inheriting list. - file operations moved to file_ops.py - readability changes... sorry - changes for consistency across trove and non-trove cache
- don't cancel a rebase.
- lambda to be pedantic about the type map expects. - added exception package with InvalidCookieException.py - added multiprocess package with exorcise_daemons.py - exorcise_daemons#ExorcistPool creates multiprocessing pools without creating daemons - mapped self._process_order_id to multiprocess pool of purchase_keys.
- Downloading: basename now prints to avoid so much console spam. - join the pool to finalize it properly.
- created CacheData class in cache.py - read cache data in for every write.
- updated trove_base_url
- caching with json is pretty crazy, so I've switched it to a csv. - added _strtobool - added _strtonone will be useful when converting old json cache - cache object inheriting list. - file operations moved to file_ops.py - readability changes... sorry - changes for consistency across trove and non-trove cache
- don't cancel a rebase.
- multi-processing - file safety - no tmp cache anymore - cache is a visible file. - intellij .idea to .gitignore
…ytake # Conflicts: # humblebundle_downloader/download_library.py
- multi-processing - file safety - no tmp cache anymore - cache is a visible file. - intellij .idea to .gitignore
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I lost my humble library, I re-downloaded this humble bundle downloader and thought, I could clone my whole library down again. This thing was incredible slow, it was still running after I woke up. Python is faster than that...
So I forked the original and made it multiprocessed with a file writing queue. I also broke up a lot of the responsibilities and make some things a bit easier to read. I found this repository that had quite a few changes and as someone else mentioned "Seems to do a good job at consolidating the other forks." So from that comment I decided to rebase my changes on the main of this repo.
I changed the way caching works, using json for on-disk caching is kind of wild... not entirely sure what the source of the cache file corruption was, but this should be fine with cancelling in the middle interruptions or incomplete downloads. Especially with the changes made in this repo.
I have not multi-processed trove yet, but I'll do that here soon, also converting the old cache needs to be done on first startup, but I haven't done that yet either
Below is a list of itemized changes, probably not well written but if there are any questions I'm available to answer.