Skip to content
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

storage tree command #1435

Merged
merged 18 commits into from
Mar 31, 2020
Merged

storage tree command #1435

merged 18 commits into from
Mar 31, 2020

Conversation

asvetlov
Copy link
Contributor

No description provided.

Copy link
Contributor

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fetching all directories may take a long time. It would be better to start outputting directories when they are ready. It requires limiting the number of simultaneous requests and supporting some kind of queue, so directories which are output first should be fetched first.

try:
tree = await fetch_tree(root.client, uri, show_all)
tree = dataclasses.replace(tree, name=str(path))
except (OSError, ResourceNotFound, IllegalArgumentError) as error:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure that IllegalArgumentError is still needed. It was raised when you tried to get a listdir of a non-directory. Now it should raise OSError or ResourceNotFound.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, removed.

@asvetlov
Copy link
Contributor Author

Currently, the pager (from click) doesn't work well with async generators.
Also, it requires the whole content before starting paging on Windows.
There is an ability to reimplement the pager from scratch to support all features.
Maybe I'll find a time for it but definitely now I have tasks with higher priority.

@asvetlov asvetlov merged commit 613fc40 into master Mar 31, 2020
@asvetlov asvetlov deleted the tree branch March 31, 2020 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants