{"action":"created","issue":{"url":"https://api.github.com/repos/treethought/flask-assistant/issues/27","repository_url":"https://api.github.com/repos/treethought/flask-assistant","labels_url":"https://api.github.com/repos/treethought/flask-assistant/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/treethought/flask-assistant/issues/27/comments","events_url":"https://api.github.com/repos/treethought/flask-assistant/issues/27/events","html_url":"https://github.com/treethought/flask-assistant/issues/27","id":243266293,"number":27,"title":"Triggering functions from a scheduler? ","user":{"login":"sharkwheels","id":6801378,"avatar_url":"https://avatars2.githubusercontent.com/u/6801378?v=4","gravatar_id":"","url":"https://api.github.com/users/sharkwheels","html_url":"https://github.com/sharkwheels","followers_url":"https://api.github.com/users/sharkwheels/followers","following_url":"https://api.github.com/users/sharkwheels/following{/other_user}","gists_url":"https://api.github.com/users/sharkwheels/gists{/gist_id}","starred_url":"https://api.github.com/users/sharkwheels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharkwheels/subscriptions","organizations_url":"https://api.github.com/users/sharkwheels/orgs","repos_url":"https://api.github.com/users/sharkwheels/repos","events_url":"https://api.github.com/users/sharkwheels/events{/privacy}","received_events_url":"https://api.github.com/users/sharkwheels/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-07-16T21:03:31Z","updated_at":"2017-07-19T04:57:48Z","closed_at":null,"body":"How does one go about using Flask's app_context w/ flask-assistant? I'm trying to trigger a function on a scheduler. So w/ flask I can wrap the scheduler job in with app.app_context(): and trigger functions (that might be horrible). \r\n\r\nBut from an extension like flask-assistant? Not sure. Posted over on stackoverflow, figured I'd ask here too. Though this might be the complete wrong way to go about it. \r\n\r\nhttps://stackoverflow.com/questions/45132878/trigger-a-function-inside-flask-assistant\r\n"},"comment":{"url":"https://api.github.com/repos/treethought/flask-assistant/issues/comments/316272947","html_url":"https://github.com/treethought/flask-assistant/issues/27#issuecomment-316272947","issue_url":"https://api.github.com/repos/treethought/flask-assistant/issues/27","id":316272947,"user":{"login":"treethought","id":15894818,"avatar_url":"https://avatars3.githubusercontent.com/u/15894818?v=4","gravatar_id":"","url":"https://api.github.com/users/treethought","html_url":"https://github.com/treethought","followers_url":"https://api.github.com/users/treethought/followers","following_url":"https://api.github.com/users/treethought/following{/other_user}","gists_url":"https://api.github.com/users/treethought/gists{/gist_id}","starred_url":"https://api.github.com/users/treethought/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treethought/subscriptions","organizations_url":"https://api.github.com/users/treethought/orgs","repos_url":"https://api.github.com/users/treethought/repos","events_url":"https://api.github.com/users/treethought/events{/privacy}","received_events_url":"https://api.github.com/users/treethought/received_events","type":"User","site_admin":false},"created_at":"2017-07-19T04:57:48Z","updated_at":"2017-07-19T04:57:48Z","body":"I agree with @sriramsv, this seems to be outside the scope of flask-assistant. The action functions are triggered via requests from API.ai and return a response formatted for API.ai to accept.\r\n\r\nSo even if you did schedule the action function to trigger, the result wouldn't \"go anywhere\" if that makes sense. As @sriramsv hinted, you may want to schedule some function to make a call to your API.ai agent which would then make a request to your flask-assistant app.\r\n\r\nThese [docs](https://api.ai/docs/reference/agent/query) will help if you go that route"}}
{"actor":{"display_login":"treethought"}}