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

redis-helper.sh の拡充 #208

Open
takano32 opened this issue Apr 27, 2020 · 1 comment
Open

redis-helper.sh の拡充 #208

takano32 opened this issue Apr 27, 2020 · 1 comment

Comments

@takano32
Copy link
Member

queue が 0 でも (empty list or set) をカウントしてしまうバグがあった。

KEYS によるカウントは redis-helper.sh に入れたい。

redis-help_helper.sh を作成してテストの実装と拡充をしたいところ。

# 全体の回答状況を収集
total_vote_count=`redis-cli KEYS vscovid-crawler-vote:result-* | wc -l`
remaining_vote_count=`redis-cli KEYS vscovid-crawler-vote:queue-*  | wc -l`
current_status="全回答数: $total_vote_count
残り件数: $remaining_vote_count"
echo "$current_status"

slack-bot/url-vote-rank.sh より抜粋。

KEYS のカウントをする部分を切り出したい。

@takano32
Copy link
Member Author

$ redis-cli KEYS vscovid-crawler-vote:queue-*  | wc -l
1
$ redis-cli KEYS vscovid-crawler-vote:queue-*
(empty list or set)

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

1 participant