{"action":"created","issue":{"url":"https://api.github.com/repos/spotify/luigi/issues/1625","repository_url":"https://api.github.com/repos/spotify/luigi","labels_url":"https://api.github.com/repos/spotify/luigi/issues/1625/labels{/name}","comments_url":"https://api.github.com/repos/spotify/luigi/issues/1625/comments","events_url":"https://api.github.com/repos/spotify/luigi/issues/1625/events","html_url":"https://github.com/spotify/luigi/pull/1625","id":145128429,"number":1625,"title":"[fixed] Task status messages","user":{"login":"riga","id":1908734,"avatar_url":"https://avatars.githubusercontent.com/u/1908734?v=3","gravatar_id":"","url":"https://api.github.com/users/riga","html_url":"https://github.com/riga","followers_url":"https://api.github.com/users/riga/followers","following_url":"https://api.github.com/users/riga/following{/other_user}","gists_url":"https://api.github.com/users/riga/gists{/gist_id}","starred_url":"https://api.github.com/users/riga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riga/subscriptions","organizations_url":"https://api.github.com/users/riga/orgs","repos_url":"https://api.github.com/users/riga/repos","events_url":"https://api.github.com/users/riga/events{/privacy}","received_events_url":"https://api.github.com/users/riga/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2016-04-01T09:07:39Z","updated_at":"2016-04-05T02:22:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/spotify/luigi/pulls/1625","html_url":"https://github.com/spotify/luigi/pull/1625","diff_url":"https://github.com/spotify/luigi/pull/1625.diff","patch_url":"https://github.com/spotify/luigi/pull/1625.patch"},"body":"> This PR is a fixed version of PR #1621 which has a faulty commit history.\r\n\r\nThis PR adds status messages to tasks which are also visible on the scheduler GUI.\r\n\r\nExamples:\r\n\r\n![task list](https://dl.dropboxusercontent.com/u/1021570/luigi1.png \"Usage in Task List\")\r\n\r\n![worker list](https://dl.dropboxusercontent.com/u/1021570/luigi2.png \"Usage in Worker List\")\r\n\r\nStatus messages are meant to change during the run method in an [opportunistic way](https://github.com/riga/luigi/blob/statusTexts/luigi/task.py#L515). Especially for long-running non-Hadoop tasks, the ability to read those messages directly in the scheduler GUI is quite helpful (at least for us). Internally, message changes are propagated to the scheduler via a ``_status_message_callback`` which is - in contrast to ``tracking_url_callback`` - not passed to the run method, but set by the ``TaskProcess``.\r\n\r\nUsage example:\r\n```python\r\nclass MyTask(luigi.Task):\r\n    ...\r\n    def run(self):\r\n        for i in range(100):\r\n            # do some hard work here\r\n            if i % 10 == 0:\r\n                self.set_status_message(\"Progress: %s / 100\" % i)\r\n```\r\n\r\nI know that you don't like PR's that affect core code (which is reasonable =) ), but imho this feature is both lightweight *and* really helpful."},"comment":{"url":"https://api.github.com/repos/spotify/luigi/issues/comments/205601767","html_url":"https://github.com/spotify/luigi/pull/1625#issuecomment-205601767","issue_url":"https://api.github.com/repos/spotify/luigi/issues/1625","id":205601767,"user":{"login":"Tarrasch","id":294349,"avatar_url":"https://avatars.githubusercontent.com/u/294349?v=3","gravatar_id":"","url":"https://api.github.com/users/Tarrasch","html_url":"https://github.com/Tarrasch","followers_url":"https://api.github.com/users/Tarrasch/followers","following_url":"https://api.github.com/users/Tarrasch/following{/other_user}","gists_url":"https://api.github.com/users/Tarrasch/gists{/gist_id}","starred_url":"https://api.github.com/users/Tarrasch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tarrasch/subscriptions","organizations_url":"https://api.github.com/users/Tarrasch/orgs","repos_url":"https://api.github.com/users/Tarrasch/repos","events_url":"https://api.github.com/users/Tarrasch/events{/privacy}","received_events_url":"https://api.github.com/users/Tarrasch/received_events","type":"User","site_admin":false},"created_at":"2016-04-05T02:22:10Z","updated_at":"2016-04-05T02:22:10Z","body":"We do also have a set of scheduler tests (they are disabled in Travis for flakiness reasons), but can you add a that case there to and make sure it passes locally?"}}