Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 하나의 엔드포인트에서 여러가지 로직을 수행하는 경우 #14

Open
JangBomi opened this issue Sep 22, 2022 · 1 comment

Comments

@JangBomi
Copy link

JangBomi commented Sep 22, 2022

query counter를 저희 팀 프로젝트에 사용해봤어요

url: POST /api/event
time: 12
count : 3
select member0_.id as id1_3_, member0_.first_login as first_lo2_3_, member0_.slack_id as slack_id3_3_, member0_.thumbnail_url as thumbnai4_3_, member0_.username as username5_3_ from member member0_ where member0_.slack_id=?
select channel0_.id as id1_1_, channel0_.name as name2_1_, channel0_.slack_id as slack_id3_1_ from channel channel0_ where channel0_.slack_id=?
insert into message (id, channel_id, member_id, modified_date, posted_date, slack_message_id, text) values (default, ?, ?, ?, ?, ?, ?)
url: POST /api/event
time: 12
count : 4
select message0_.id as id1_4_, message0_.channel_id as channel_6_4_, message0_.member_id as member_i7_4_, message0_.modified_date as modified2_4_, message0_.posted_date as posted_d3_4_, message0_.slack_message_id as slack_me4_4_, message0_.text as text5_4_ from message message0_ where message0_.slack_message_id=?
select member0_.id as id1_3_, member0_.first_login as first_lo2_3_, member0_.slack_id as slack_id3_3_, member0_.thumbnail_url as thumbnai4_3_, member0_.username as username5_3_ from member member0_ where member0_.slack_id=?
select channel0_.id as id1_1_, channel0_.name as name2_1_, channel0_.slack_id as slack_id3_1_ from channel channel0_ where channel0_.slack_id=?
insert into message (id, channel_id, member_id, modified_date, posted_date, slack_message_id, text) values (default, ?, ?, ?, ?, ?, ?)

저희 팀 프로젝트에서는 같은 api요청이더라도 (POST /api/event 요청) 코드 내부에서 다른 로직을 수행하고, 이 경우에 쿼리가 다르게 나가는데,
파일에 저장될 때는 같은 url로 들어온 요청이면 한 가지만 저장되는 것 같아요!!

이슈 함 등록해보고싶어서 남깁니다
191633979-bf2ba736-58a3-45e7-954c-d8f9470a5762
너무 멋져요
따봉 소고래~ 👍 👍 👍 👍 👍

@sojukang
Copy link
Contributor

sojukang commented Sep 24, 2022

감사합니다 봄🙇‍♀️🙇‍♀️🙇‍♀️👍
해당 이슈를 반영하기 위해서는 나가는 쿼리가 다를 경우 같은 API 요청이더라도 따로 기록하도록 해야겠군요!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants