{"action":"created","issue":{"url":"https://api.github.com/repos/getnikola/nikola/issues/1632","labels_url":"https://api.github.com/repos/getnikola/nikola/issues/1632/labels{/name}","comments_url":"https://api.github.com/repos/getnikola/nikola/issues/1632/comments","events_url":"https://api.github.com/repos/getnikola/nikola/issues/1632/events","html_url":"https://github.com/getnikola/nikola/pull/1632","id":60274966,"number":1632,"title":"Support for EarlyTasks.","user":{"login":"felixfontein","id":5781356,"avatar_url":"https://avatars.githubusercontent.com/u/5781356?v=3","gravatar_id":"","url":"https://api.github.com/users/felixfontein","html_url":"https://github.com/felixfontein","followers_url":"https://api.github.com/users/felixfontein/followers","following_url":"https://api.github.com/users/felixfontein/following{/other_user}","gists_url":"https://api.github.com/users/felixfontein/gists{/gist_id}","starred_url":"https://api.github.com/users/felixfontein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixfontein/subscriptions","organizations_url":"https://api.github.com/users/felixfontein/orgs","repos_url":"https://api.github.com/users/felixfontein/repos","events_url":"https://api.github.com/users/felixfontein/events{/privacy}","received_events_url":"https://api.github.com/users/felixfontein/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/getnikola/nikola/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/getnikola/nikola/milestones/15","html_url":"https://github.com/getnikola/nikola/milestones/Whenever","labels_url":"https://api.github.com/repos/getnikola/nikola/milestones/15/labels","id":633525,"number":15,"title":"Whenever","description":"Things that have no deadline, or can be done as plugins, and have no implications for release.","creator":{"login":"ralsina","id":1579,"avatar_url":"https://avatars.githubusercontent.com/u/1579?v=3","gravatar_id":"","url":"https://api.github.com/users/ralsina","html_url":"https://github.com/ralsina","followers_url":"https://api.github.com/users/ralsina/followers","following_url":"https://api.github.com/users/ralsina/following{/other_user}","gists_url":"https://api.github.com/users/ralsina/gists{/gist_id}","starred_url":"https://api.github.com/users/ralsina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ralsina/subscriptions","organizations_url":"https://api.github.com/users/ralsina/orgs","repos_url":"https://api.github.com/users/ralsina/repos","events_url":"https://api.github.com/users/ralsina/events{/privacy}","received_events_url":"https://api.github.com/users/ralsina/received_events","type":"User","site_admin":false},"open_issues":46,"closed_issues":11,"state":"open","created_at":"2014-04-18T00:51:25Z","updated_at":"2015-03-08T20:41:13Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-03-08T20:39:36Z","updated_at":"2015-03-08T21:25:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/getnikola/nikola/pulls/1632","html_url":"https://github.com/getnikola/nikola/pull/1632","diff_url":"https://github.com/getnikola/nikola/pull/1632.diff","patch_url":"https://github.com/getnikola/nikola/pull/1632.patch"},"body":"The earlytask_impl branch implements support for EarlyTasks in Nikola, which are tasks that are executed before Nikola scans for posts. See #1562 for more details. After some testing (sorry it took so long) I think it works rather well now, so it's time to start a PR :-)\r\n\r\nWhat this branch improves over current Nikola:\r\n - there's a better separation between Tasks and LateTasks: LateTasks won't be processed before Tasks aren't done; this makes in particular a difference when multithreading/multiprocessing is used;\r\n - scanning for posts is now collected to happen at precisely one place: in stage 0, which is before the stage where all Task objects are processed, and after all EarlyTask objects are processed;\r\n\r\nWhat this branch requires:\r\n - an up-to-date version of doit\r\n\r\nWhat this branch cannot deliver at the moment:\r\n - ```nikola build <filename>``` does not work without further support in doit (see https://github.com/pydoit/doit/issues/20, haven't had time to really work on it yet);\r\n - ```nikola build <taskname>``` only works for tasks named after the plugin itself, and not for (potential) otherwise named tasks created by the plugins;\r\n - when running nikola in parallel (via ```-n 4``` for example), one has to tell doit (via ```-P thread```) to use threads instead of processes.\r\n\r\n(fixes #1553 and #1562)"},"comment":{"url":"https://api.github.com/repos/getnikola/nikola/issues/comments/77775335","html_url":"https://github.com/getnikola/nikola/pull/1632#issuecomment-77775335","issue_url":"https://api.github.com/repos/getnikola/nikola/issues/1632","id":77775335,"user":{"login":"felixfontein","id":5781356,"avatar_url":"https://avatars.githubusercontent.com/u/5781356?v=3","gravatar_id":"","url":"https://api.github.com/users/felixfontein","html_url":"https://github.com/felixfontein","followers_url":"https://api.github.com/users/felixfontein/followers","following_url":"https://api.github.com/users/felixfontein/following{/other_user}","gists_url":"https://api.github.com/users/felixfontein/gists{/gist_id}","starred_url":"https://api.github.com/users/felixfontein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixfontein/subscriptions","organizations_url":"https://api.github.com/users/felixfontein/orgs","repos_url":"https://api.github.com/users/felixfontein/repos","events_url":"https://api.github.com/users/felixfontein/events{/privacy}","received_events_url":"https://api.github.com/users/felixfontein/received_events","type":"User","site_admin":false},"created_at":"2015-03-08T21:25:08Z","updated_at":"2015-03-08T21:25:08Z","body":"Hmm, at the moment I don't see a completely satisfactory way to force the use of threads via code, except by injecting ```-P thread``` into the command line arguments. Overwriting `_execute` is not a good idea (in case the signature of doit's `Run._execute` every changes), but that's essentially the place where the default value comes from. @schettino72 or do I miss something?"}}