{"action":"created","issue":{"url":"https://api.github.com/repos/oTree-org/otree-core/issues/253","labels_url":"https://api.github.com/repos/oTree-org/otree-core/issues/253/labels{/name}","comments_url":"https://api.github.com/repos/oTree-org/otree-core/issues/253/comments","events_url":"https://api.github.com/repos/oTree-org/otree-core/issues/253/events","html_url":"https://github.com/oTree-org/otree-core/issues/253","id":48409241,"number":253,"title":"Timeout feature: get celery working","user":{"login":"oTree-org","id":5423929,"avatar_url":"https://avatars.githubusercontent.com/u/5423929?v=3","gravatar_id":"","url":"https://api.github.com/users/oTree-org","html_url":"https://github.com/oTree-org","followers_url":"https://api.github.com/users/oTree-org/followers","following_url":"https://api.github.com/users/oTree-org/following{/other_user}","gists_url":"https://api.github.com/users/oTree-org/gists{/gist_id}","starred_url":"https://api.github.com/users/oTree-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oTree-org/subscriptions","organizations_url":"https://api.github.com/users/oTree-org/orgs","repos_url":"https://api.github.com/users/oTree-org/repos","events_url":"https://api.github.com/users/oTree-org/events{/privacy}","received_events_url":"https://api.github.com/users/oTree-org/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/oTree-org/otree-core/labels/consultant","name":"consultant","color":"009800"},{"url":"https://api.github.com/repos/oTree-org/otree-core/labels/p1","name":"p1","color":"eb6420"}],"state":"closed","locked":false,"assignee":{"login":"oTree-org","id":5423929,"avatar_url":"https://avatars.githubusercontent.com/u/5423929?v=3","gravatar_id":"","url":"https://api.github.com/users/oTree-org","html_url":"https://github.com/oTree-org","followers_url":"https://api.github.com/users/oTree-org/followers","following_url":"https://api.github.com/users/oTree-org/following{/other_user}","gists_url":"https://api.github.com/users/oTree-org/gists{/gist_id}","starred_url":"https://api.github.com/users/oTree-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oTree-org/subscriptions","organizations_url":"https://api.github.com/users/oTree-org/orgs","repos_url":"https://api.github.com/users/oTree-org/repos","events_url":"https://api.github.com/users/oTree-org/events{/privacy}","received_events_url":"https://api.github.com/users/oTree-org/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2014-11-11T17:19:06Z","updated_at":"2015-03-13T03:47:36Z","closed_at":"2015-03-13T03:47:36Z","body":"I am implementing the timeout feature, which lets the programmer specify `timeout_seconds` on a Page, after which the page will automatically advance. This feature ensures that if a game is being played in a large group, it will not be possible for one slow player to delay everybody else.\r\n\r\nWe currently have JavaScript that auto-clicks the submit button. But as a backup, we need a server-side solution, in case the user closes their browser, or the JavaScript fails otherwise (e.g. the user clicks the stop button). Even if the user completely stops playing, the game should progress from page to page.\r\n\r\nI have written code [here](https://github.com/oTree-org/otree-core/blob/timeout/otree/timeout/tasks.py) in the timeout branch that defines celery tasks that should accomplish the above goals, and these tasks are called in `otree.views.abstract`. It uses the Django test client to simulate the user submitting the page with an empty form (in which case form validation is skipped, and instead a value defined in the model field's `timeout_default` arg is used).\r\n\r\nHowever, Celery is not currently working. When I run `celery worker` I get:\r\n\r\n```\r\n[2014-11-12 00:00:14,375: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@127.0.0.1:5672//: [Errno 10061]\r\n No connection could be made because the target machine actively refused it.\r\nTrying again in 10.00 seconds...\r\n```\r\n\r\nI have never used celery before, so it would be good to get someone's help on this.\r\n\r\nIdeally I imagine that celery should be integrated into the ./otree script or the `Procfile` so that it works seamlessly locally on Heroku."},"comment":{"url":"https://api.github.com/repos/oTree-org/otree-core/issues/comments/78779906","html_url":"https://github.com/oTree-org/otree-core/issues/253#issuecomment-78779906","issue_url":"https://api.github.com/repos/oTree-org/otree-core/issues/253","id":78779906,"user":{"login":"oTree-org","id":5423929,"avatar_url":"https://avatars.githubusercontent.com/u/5423929?v=3","gravatar_id":"","url":"https://api.github.com/users/oTree-org","html_url":"https://github.com/oTree-org","followers_url":"https://api.github.com/users/oTree-org/followers","following_url":"https://api.github.com/users/oTree-org/following{/other_user}","gists_url":"https://api.github.com/users/oTree-org/gists{/gist_id}","starred_url":"https://api.github.com/users/oTree-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oTree-org/subscriptions","organizations_url":"https://api.github.com/users/oTree-org/orgs","repos_url":"https://api.github.com/users/oTree-org/repos","events_url":"https://api.github.com/users/oTree-org/events{/privacy}","received_events_url":"https://api.github.com/users/oTree-org/received_events","type":"User","site_admin":false},"created_at":"2015-03-13T03:47:36Z","updated_at":"2015-03-13T03:47:36Z","body":"Fixed a while ago"}}