{"action":"created","issue":{"url":"https://api.github.com/repos/slashdotdash/commanded/issues/36","repository_url":"https://api.github.com/repos/slashdotdash/commanded","labels_url":"https://api.github.com/repos/slashdotdash/commanded/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/slashdotdash/commanded/issues/36/comments","events_url":"https://api.github.com/repos/slashdotdash/commanded/issues/36/events","html_url":"https://github.com/slashdotdash/commanded/issues/36","id":191693225,"number":36,"title":"Support delayed command dispatch","user":{"login":"slashdotdash","id":3167,"avatar_url":"https://avatars.githubusercontent.com/u/3167?v=3","gravatar_id":"","url":"https://api.github.com/users/slashdotdash","html_url":"https://github.com/slashdotdash","followers_url":"https://api.github.com/users/slashdotdash/followers","following_url":"https://api.github.com/users/slashdotdash/following{/other_user}","gists_url":"https://api.github.com/users/slashdotdash/gists{/gist_id}","starred_url":"https://api.github.com/users/slashdotdash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slashdotdash/subscriptions","organizations_url":"https://api.github.com/users/slashdotdash/orgs","repos_url":"https://api.github.com/users/slashdotdash/repos","events_url":"https://api.github.com/users/slashdotdash/events{/privacy}","received_events_url":"https://api.github.com/users/slashdotdash/received_events","type":"User","site_admin":false},"labels":[{"id":452742396,"url":"https://api.github.com/repos/slashdotdash/commanded/labels/proposal","name":"proposal","color":"006b75","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-25T12:34:10Z","updated_at":"2016-11-25T13:16:58Z","closed_at":null,"body":"Allow commands to be dispatched and to be executed after a given delay or at a specific date & time.\r\n\r\n```elixir\r\n# dispatch command after given delay\r\n:ok = Commanded.dispatch(%ExpireOrder{...}, delay: 10_000)\r\n\r\n# dispatch command at given date/time\r\n:ok = Commanded.dispatch(%ExpireOrder{...}, delay_until: ~N[2016-11-26 09:00:00])\r\n```\r\n\r\nThis allows long running process managers to handle timeouts. When a process is started it can dispatch a timeout command with an appropriate delay. The command is dispatched to its aggregate who can raise an appropriate timeout domain event. This can be handled by the process manager as needed.\r\n\r\nDelayed commands must be persisted to external storage to ensure they survive application or process restarts.\r\n"},"comment":{"url":"https://api.github.com/repos/slashdotdash/commanded/issues/comments/262955618","html_url":"https://github.com/slashdotdash/commanded/issues/36#issuecomment-262955618","issue_url":"https://api.github.com/repos/slashdotdash/commanded/issues/36","id":262955618,"user":{"login":"Papipo","id":22678,"avatar_url":"https://avatars.githubusercontent.com/u/22678?v=3","gravatar_id":"","url":"https://api.github.com/users/Papipo","html_url":"https://github.com/Papipo","followers_url":"https://api.github.com/users/Papipo/followers","following_url":"https://api.github.com/users/Papipo/following{/other_user}","gists_url":"https://api.github.com/users/Papipo/gists{/gist_id}","starred_url":"https://api.github.com/users/Papipo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Papipo/subscriptions","organizations_url":"https://api.github.com/users/Papipo/orgs","repos_url":"https://api.github.com/users/Papipo/repos","events_url":"https://api.github.com/users/Papipo/events{/privacy}","received_events_url":"https://api.github.com/users/Papipo/received_events","type":"User","site_admin":false},"created_at":"2016-11-25T13:16:58Z","updated_at":"2016-11-25T13:16:58Z","body":"It feels weird to have commands that are dispatched later.\r\n\r\nIt seems better to have some kind of timed process (which should be a PM probably, and we already talked about PMs and timers) which just sends the command later. Just a ExpireOrder command that changes the state of the Order, no? Besides, a PM can control the expiring process if the command is dropped for any reason, something you can't do if you just send a delayed command once."}}
{"actor":{"display_login":"Papipo"}}