#22258 closed New feature (fixed)
Show progress during dumpdata
Reported by: | Gwildor Sok | Owned by: | Karol Duleba |
---|---|---|---|
Component: | Core (Management commands) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In response of ticket #22251, I'm opening this as a separate issue like requested. You can read the need for this option there, but shortly speaking, the commands as they are now are not user friendly at all. The commands can go on for a very long time, depending on your database size, without giving any clue of its state and progress.
If and when #22257 is implemented, the commands could start by collecting amount of rows to progress, and periodically printing the progress to the console. This way the user can make a fair estimate on when the commands are done and whether they are actually still running.
Attachments (1)
Change History (11)
comment:1 by , 11 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 11 years ago
comment:3 by , 11 years ago
Before we get too carried away here, someone needs to explain how it's going to be implemented. json.dumps and lxml don't provide progress APIs AFAIK.
comment:4 by , 11 years ago
Well I am attaching a simple diff just for JSON. It does very simply does the job of displaying progress(random not actual), but we can think along similar lines like we could calculate total no. of objects and then print progress accurately depending upon no of objects serialized.
by , 11 years ago
Attachment: | 22258#test.diff added |
---|
comment:5 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
I was thinking of adding some kind of utility to allow showing progress from any management command.
As far as I looked (loading data) there is no clean way of showing % of progress because of generators/reading streams from files, so progress like during tests. For data load it might be possible to show proper progress bar.
comment:6 by , 9 years ago
Has patch: | set |
---|---|
Needs tests: | set |
188a2418807f661eedfc675731521f2f46a3c49a (#21652) added progress information for loaddata.
This PR is adding progress report for dumpdata: https://github.com/django/django/pull/5032
comment:7 by , 9 years ago
Needs tests: | unset |
---|
comment:8 by , 9 years ago
Summary: | Show progress during dumpdata and loaddata → Show progress during dumpdata |
---|---|
Triage Stage: | Accepted → Ready for checkin |
We can add the patch given #22257, then as posted there:
I think we can keep default as stdout and and for this, we can do the following:
backwards compatibilty is there, also issue here is also addressed.
thoughts?