{"action":"created","issue":{"url":"https://api.github.com/repos/RichardKnop/machinery/issues/91","repository_url":"https://api.github.com/repos/RichardKnop/machinery","labels_url":"https://api.github.com/repos/RichardKnop/machinery/issues/91/labels{/name}","comments_url":"https://api.github.com/repos/RichardKnop/machinery/issues/91/comments","events_url":"https://api.github.com/repos/RichardKnop/machinery/issues/91/events","html_url":"https://github.com/RichardKnop/machinery/issues/91","id":169734314,"number":91,"title":"Feature Request: Delay task ","user":{"login":"owenhaynes","id":1472893,"avatar_url":"https://avatars.githubusercontent.com/u/1472893?v=3","gravatar_id":"","url":"https://api.github.com/users/owenhaynes","html_url":"https://github.com/owenhaynes","followers_url":"https://api.github.com/users/owenhaynes/followers","following_url":"https://api.github.com/users/owenhaynes/following{/other_user}","gists_url":"https://api.github.com/users/owenhaynes/gists{/gist_id}","starred_url":"https://api.github.com/users/owenhaynes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owenhaynes/subscriptions","organizations_url":"https://api.github.com/users/owenhaynes/orgs","repos_url":"https://api.github.com/users/owenhaynes/repos","events_url":"https://api.github.com/users/owenhaynes/events{/privacy}","received_events_url":"https://api.github.com/users/owenhaynes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-06T07:19:41Z","updated_at":"2016-08-06T12:03:29Z","closed_at":null,"body":"Ability to delay the tasks for processing e.g run task in 5 Min.\r\n\r\nCould be implemented by adding a Execute Time to the task signature, and by user a helper method e.g\r\n```go\r\nfunc (t *TaskSignature) Delay(d time.Duration) \r\n```\r\n\r\nWhen the worker gets the task, it holds onto it until the execution time and then runs it. \r\n\r\nYou want a store a time to execute and not just the delay as you want to guarantee that the task is run as close as possible to it, If the worker crashes the delay would start again otherwise."},"comment":{"url":"https://api.github.com/repos/RichardKnop/machinery/issues/comments/238020120","html_url":"https://github.com/RichardKnop/machinery/issues/91#issuecomment-238020120","issue_url":"https://api.github.com/repos/RichardKnop/machinery/issues/91","id":238020120,"user":{"login":"owenhaynes","id":1472893,"avatar_url":"https://avatars.githubusercontent.com/u/1472893?v=3","gravatar_id":"","url":"https://api.github.com/users/owenhaynes","html_url":"https://github.com/owenhaynes","followers_url":"https://api.github.com/users/owenhaynes/followers","following_url":"https://api.github.com/users/owenhaynes/following{/other_user}","gists_url":"https://api.github.com/users/owenhaynes/gists{/gist_id}","starred_url":"https://api.github.com/users/owenhaynes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owenhaynes/subscriptions","organizations_url":"https://api.github.com/users/owenhaynes/orgs","repos_url":"https://api.github.com/users/owenhaynes/repos","events_url":"https://api.github.com/users/owenhaynes/events{/privacy}","received_events_url":"https://api.github.com/users/owenhaynes/received_events","type":"User","site_admin":false},"created_at":"2016-08-06T12:03:29Z","updated_at":"2016-08-06T12:03:29Z","body":"I thought rabbit required installing a plugin for delayed tasks, the plugin\nthen requires a header being applied to tasks with the delay\n\nOn 6 Aug 2016 12:46 p.m., \"Richard Knop\" <notifications@github.com> wrote:\n\n> A good concept and I agree in principal.\n>\n> This could be supported natively by AMQP. You can schedule a delayed task.\n> Redis broker also supports delayed tasks I believe.\n>\n> So this could be implemented in a native way with both AMQP and Redis\n> which is good as I am trying to keep the library behaviour consistent with\n> different brokers / backends.\n>\n> You want a store a time to execute and not just the delay as you want to\n> guarantee that the task is run as close as possible to it, If the worker\n> crashes the delay would start again otherwise.\n>\n> This would be taken care of by RabbitMQ / Redis process so machinery\n> worker crashing and restarting should not matter as the logic will be\n> handle by the broker.\n>\n> Just need to confirm that both AMQP and Redis delayed tasks support\n> setting a time when to free message to be consumed and not just some delay\n> period.\n>\n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/RichardKnop/machinery/issues/91#issuecomment-238019530>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/ABZ5faQTGKNh1kCiz51Hktbpwi8KCg1Zks5qdHQlgaJpZM4JeOXr>\n> .\n>\n"}}
{"actor":{"display_login":"owenhaynes"}}