{"action":"created","issue":{"url":"https://api.github.com/repos/OCA/OpenUpgrade/issues/326","labels_url":"https://api.github.com/repos/OCA/OpenUpgrade/issues/326/labels{/name}","comments_url":"https://api.github.com/repos/OCA/OpenUpgrade/issues/326/comments","events_url":"https://api.github.com/repos/OCA/OpenUpgrade/issues/326/events","html_url":"https://github.com/OCA/OpenUpgrade/issues/326","id":92810958,"number":326,"title":"Lack in progress feedback on OpenUpgrade scripts","user":{"login":"pedrobaeza","id":7165771,"avatar_url":"https://avatars.githubusercontent.com/u/7165771?v=3","gravatar_id":"","url":"https://api.github.com/users/pedrobaeza","html_url":"https://github.com/pedrobaeza","followers_url":"https://api.github.com/users/pedrobaeza/followers","following_url":"https://api.github.com/users/pedrobaeza/following{/other_user}","gists_url":"https://api.github.com/users/pedrobaeza/gists{/gist_id}","starred_url":"https://api.github.com/users/pedrobaeza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedrobaeza/subscriptions","organizations_url":"https://api.github.com/users/pedrobaeza/orgs","repos_url":"https://api.github.com/users/pedrobaeza/repos","events_url":"https://api.github.com/users/pedrobaeza/events{/privacy}","received_events_url":"https://api.github.com/users/pedrobaeza/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-03T07:19:20Z","updated_at":"2015-07-03T07:35:20Z","closed_at":null,"body":"One of the problems I'm facing lately with the migration of large DBs is that the process hangs for very big times without no visual feedback of what is being done, because on several migration scripts there's no clue about what is being done across the multiple methods that run (only at the beginning of the script with the pre or post-script log entry), making very difficult to identify bottlenecks to optimize.\r\n\r\nI propose to:\r\n\r\n* Include an openupgrade decorator `@openupgrade.logging(logging)` that logs a line indicating that the method name is being executed\r\n* Include a method that allows to slice an operation being done over an iterator in chunks of a determined size (passed by argument), to give feedback in the log once on each chunk. This way, you don't bloat the log, but control the progress of the current task and you can also estimate total times with the log timestamps. It can even being also estimated between chunks taking measures. For example:\r\n```\r\nCreating quants processing pickings (1-1000/192345)\r\nCreating quants processing pickings (1001-2000/192345)\r\nCreating quants processing pickings (2001-3000/192345)\r\n...\r\n```"},"comment":{"url":"https://api.github.com/repos/OCA/OpenUpgrade/issues/comments/118265284","html_url":"https://github.com/OCA/OpenUpgrade/issues/326#issuecomment-118265284","issue_url":"https://api.github.com/repos/OCA/OpenUpgrade/issues/326","id":118265284,"user":{"login":"legalsylvain","id":3407482,"avatar_url":"https://avatars.githubusercontent.com/u/3407482?v=3","gravatar_id":"","url":"https://api.github.com/users/legalsylvain","html_url":"https://github.com/legalsylvain","followers_url":"https://api.github.com/users/legalsylvain/followers","following_url":"https://api.github.com/users/legalsylvain/following{/other_user}","gists_url":"https://api.github.com/users/legalsylvain/gists{/gist_id}","starred_url":"https://api.github.com/users/legalsylvain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/legalsylvain/subscriptions","organizations_url":"https://api.github.com/users/legalsylvain/orgs","repos_url":"https://api.github.com/users/legalsylvain/repos","events_url":"https://api.github.com/users/legalsylvain/events{/privacy}","received_events_url":"https://api.github.com/users/legalsylvain/received_events","type":"User","site_admin":false},"created_at":"2015-07-03T07:35:20Z","updated_at":"2015-07-03T07:35:20Z","body":":+1: "}}