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

Feature/20220503 add matching #3

Merged
merged 10 commits into from May 17, 2020
Merged

Conversation

waretaflow
Copy link

@waretaflow waretaflow commented May 14, 2020

やったこと

  • DB保存追加
  • ID取得←LineのIDを流用し数字のみ抽出
  • json質問・回答文更新

あとやること

  • IDを6桁まで減らす
  • ブロックされた時にerror走るところ直す
  • 質問時画像の刷新
  • 処理関数化←必要箇所あれば

"type": "postback",
"label": "こだわる",
"displayText": "こだわる",
"data": "action=fashion&fashion=こだわる"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dataの形式が日本語が危うい

json/Job.json Outdated
"type": "postback",
"label": "飲食(居酒屋、フード)",
"displayText": "飲食(居酒屋、フード)",
"data": "action=job&job=飲食(居酒屋、フード)"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dataの形式

json/Smoke.json Outdated
"type": "postback",
"label": "吸わない",
"displayText": "吸わない",
"data": "action=smoke&smoke=吸わない"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

データの形式

@@ -4,4 +4,4 @@ echo "DEPLOY START!!"
funcname="aisekiyaFunc"

docker run --rm -v "$PWD":/var/task shoda888/local2pylambda:latest
aws lambda update-function-code --function-name ${funcname} --zip-file fileb://deploy_package.zip --profile aisekiya-user
aws lambda update-function-code --function-name ${funcname} --zip-file fileb://deploy_package.zip

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ローカル環境でawsユーザーを分けてた場合,これだとdefaultUserとしてデプロイされてしまうので,
--profile sisekiya-user
で運用したい

json/Age.json Outdated
"data": "action=age&age=18"
"label": "18~20",
"displayText": "18~20",
"data": "action=age&age=18-20"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

大学生世代は刻んだ方が良いかも

json/Club.json Outdated
"type": "text",
"text": "最も時間をかけてサークル・クラブ活動は何ですか?",
"size": "lg",
"weight": "regular"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"wrap": true
が無いと質問が最後まで見えない.

"type": "text",
"text": "最も時間をかけたアルバイトや仕事を教えてください",
"size": "lg",
"weight": "regular"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"wrap": true


#User情報を引数に受け取り、診断結果を返す関数。オバソン記述予定。
def matching(user_id):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

別のLambdaに移動予定

#UserIDを取得
user_id = message_dist["events"][0]["source"]["userId"]
#LineでのUser_IDは文字列を含むため、数値のみを抽出する。ちょっとこのままだと長すぎる。
user_num = re.sub("\\D", "", user_id)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

数値のみ抽出で,userの一意性が保たれるか

if postback_action == "height":
table.put_item(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DB処理は別Lambdaでやる予定

Copy link

@shoda888 shoda888 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

修正内容

  • このLambdaで不要なライブラリは一掃する(six / qr)
  • (後はコメントを参照)

@shoda888
Copy link

Conflictもしているので,適宜俺が修正しておく.

@shoda888 shoda888 force-pushed the feature/20220503_add_matching branch from f188d91 to 39b6c20 Compare May 16, 2020 07:03
@shoda888
Copy link

ひとまず,コンフリクト解消

@shoda888 shoda888 merged commit fa8a396 into development May 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants