{"action":"closed","issue":{"url":"https://api.github.com/repos/ruby-grape/grape/issues/1334","repository_url":"https://api.github.com/repos/ruby-grape/grape","labels_url":"https://api.github.com/repos/ruby-grape/grape/issues/1334/labels{/name}","comments_url":"https://api.github.com/repos/ruby-grape/grape/issues/1334/comments","events_url":"https://api.github.com/repos/ruby-grape/grape/issues/1334/events","html_url":"https://github.com/ruby-grape/grape/issues/1334","id":142411222,"number":1334,"title":"is Puma + Grape not threadsafe?","user":{"login":"wxianfeng","id":101336,"avatar_url":"https://avatars.githubusercontent.com/u/101336?v=3","gravatar_id":"","url":"https://api.github.com/users/wxianfeng","html_url":"https://github.com/wxianfeng","followers_url":"https://api.github.com/users/wxianfeng/followers","following_url":"https://api.github.com/users/wxianfeng/following{/other_user}","gists_url":"https://api.github.com/users/wxianfeng/gists{/gist_id}","starred_url":"https://api.github.com/users/wxianfeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wxianfeng/subscriptions","organizations_url":"https://api.github.com/users/wxianfeng/orgs","repos_url":"https://api.github.com/users/wxianfeng/repos","events_url":"https://api.github.com/users/wxianfeng/events{/privacy}","received_events_url":"https://api.github.com/users/wxianfeng/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ruby-grape/grape/labels/discuss!","name":"discuss!","color":"5319e7"},{"url":"https://api.github.com/repos/ruby-grape/grape/labels/needs%20info","name":"needs info","color":"e102d8"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-03-21T17:04:54Z","updated_at":"2016-06-01T20:24:17Z","closed_at":"2016-06-01T20:24:17Z","body":"my online Grape Project change unicorn to puma deploy.\r\n\r\nso much users get other users data from api.\r\n\r\ndevelop by Rails 4.2 + puma 3.0.1 + Grape 0.9.0.\r\n\r\nsome code like as:\r\n\r\nbase.rb\r\n```\r\nmodule V3\r\n  class Base < Grape::API \r\n    helpers V3Helpers\r\n\r\n    include V3::Photos\r\n  end\r\nend\r\n```\r\n\r\nv3_helpers.rb\r\n```\r\ndef current_user\r\nreturn @current_user if defined? @current_user\r\n\r\n@current_user = User.find(params[:uid])\r\nend\r\n```\r\n\r\nphotos.rb\r\n```\r\nmodule V3\r\n  module Photos\r\n    extend ActiveSupport::Concern\r\n\r\n    included do\r\n\r\n      resources :photos do\r\n    \r\n        get do \r\n          photos = Photo.where(user_id: current_user.id)\r\n          photos.to_json \r\n        end   \r\n   \r\n      end\r\n\r\n    end\r\nend\r\nend\r\n```\r\n\r\nis my code not threadsafe ?\r\n\r\n"}}
{"actor":{"display_login":"dblock"}}