projects
/
APKPM.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
53e89c5
)
support normal scalars from redis
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 23 Mar 2011 22:12:28 +0000
(22:12 +0000)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 23 Mar 2011 22:12:28 +0000
(22:12 +0000)
web_ui.pl
patch
|
blob
|
history
diff --git
a/web_ui.pl
b/web_ui.pl
index
d6f2e35
..
f82f67a
100755
(executable)
--- a/
web_ui.pl
+++ b/
web_ui.pl
@@
-141,7
+141,9
@@
get '/_redis' => sub {
my $redis = Redis->new;
my $status;
- $status->{$_} = $redis->scard($_) foreach $redis->keys('poll.*');
+ foreach my $k ( $redis->keys('poll.*') ) {
+ $status->{$k} = eval { $redis->scard($k) } || $redis->get($k);
+ }
warn "## ", dump $status;
_render_jsonp( $self, Mojo::JSON->new->encode({ status => $status }) );