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

scripts/を綺麗にする #239

Open
Cj-bc opened this issue Sep 17, 2018 · 6 comments
Open

scripts/を綺麗にする #239

Cj-bc opened this issue Sep 17, 2018 · 6 comments
Labels
after first release to do after the first release bug Something isn't working low priority This issue or pull request can be postponed refactoring Changes not in its behavior, but in the code

Comments

@Cj-bc
Copy link
Member

Cj-bc commented Sep 17, 2018

Step 1: 環境

  • OSのバージョン: _____
  • devenvのハッシュ: _____
  • frontendのハッシュ: _____
  • backendのハッシュ: _____

Step 2: 問題

どうなってしまうか:

  • 短時間で適当に書いたものがあるため、エラーハンドリングなどがザルです
  • あと名前がおかしい(random_applyは実質ランダムにapplyしませんごめんなさいorz)
  • エラーハンドリング及び賢くする

どうなるべきだったのか:

  • いや、作り直さなきゃだよなって((

関連するコード:

scripts/apply_random.py
scripts/draw_all.py

@Cj-bc Cj-bc added bug Something isn't working low priority This issue or pull request can be postponed refactoring Changes not in its behavior, but in the code after first release to do after the first release labels Sep 17, 2018
@shino16
Copy link
Member

shino16 commented Sep 17, 2018

#244 でやりました
/lotteries/availableが1つもないとき
ZeroDivisionErrorの発生が発覚

@shino16
Copy link
Member

shino16 commented Sep 17, 2018

こういうときどうしたらいいのかな
そもそもどこにも申し込めなかったらしょうがないので
そこはここのスクリプトの範疇を超えますね

@shino16
Copy link
Member

shino16 commented Sep 17, 2018

とりあえずlotteryがavailableじゃないときは
どこにも応募しないこととします

@Cj-bc
Copy link
Member Author

Cj-bc commented Sep 17, 2018

普通に、異常終了で返せばいいと思います。
エラーコード、確か急いで作ったから適当に-1とかにしておいたと思うけど
/usr/include/sysexists.h参考にして書くようにした方がいい(ってgoogleさんもいってた

@shino16
Copy link
Member

shino16 commented Sep 17, 2018

なるほど
ありがとうございます

@shino16
Copy link
Member

shino16 commented Sep 17, 2018

lotteryがないときは
service unavailable(69)
にします

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
after first release to do after the first release bug Something isn't working low priority This issue or pull request can be postponed refactoring Changes not in its behavior, but in the code
Projects
None yet
Development

No branches or pull requests

2 participants