Skip to content

Commit

Permalink
Adding active premiums to status page.
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelclay committed Dec 22, 2012
1 parent 36f99a3 commit eeae903
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 17 deletions.
8 changes: 5 additions & 3 deletions templates/rss_feeds/status.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<th>Subs</th>
<th>Active</th>
<th>Premium</th>
<th>Act. Prem</th>
<th>Per Month</th>
</tr>
{% for feed in feeds %}
Expand All @@ -29,9 +30,10 @@
</td>
<td>{{ feed.min_to_decay }}</td>
<td>{{ feed.num_subscribers }}</td>
<td>{{ feed.active_subscribers }}</td>
<td>{{ feed.premium_subscribers }}</td>
<td>{{ feed.average_stories_per_month }}</td>
<td {% if feed.active_subscribers == 0 %}style="color: lightgrey"{% endif %}>{{ feed.active_subscribers }}</td>
<td {% if feed.premium_subscribers == 0 %}style="color: lightgrey"{% endif %}>{{ feed.premium_subscribers }}</td>
<td {% if feed.active_premium_subscribers == 0 %}style="color: lightgrey"{% endif %}>{{ feed.active_premium_subscribers }}</td>
<td {% if feed.average_stories_per_month == 0 %}style="color: lightgrey"{% endif %}>{{ feed.average_stories_per_month }}</td>
</tr>
{% endfor %}

Expand Down
16 changes: 9 additions & 7 deletions utils/kill_celery.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/bin/sh

for i in `ps -o pid,command ax | grep celery | awk '!/awk/ && !/grep/ {print $1}'`
do
if [ "${i}" != "" ]; then
print "Killing: ${i}";
kill -9 ${i};
fi
done
pkill -9 -f celery

# for i in `ps -o pid,command ax | grep celery | awk '!/awk/ && !/grep/ {print $1}'`
# do
# if [ "${i}" != "" ]; then
# print "Killing: ${i}";
# kill -9 ${i};
# fi
# done

# ps aux | grep celery | egrep -v grep | awk '{print $2}' | xargs kill -9
16 changes: 9 additions & 7 deletions utils/kill_gunicorn.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/bin/sh

for i in `ps -o pid,command ax | grep gunicorn | awk '!/awk/ && !/grep/ {print $1}'`
do
if [ "${i}" != "" ]; then
print "Killing: ${i}";
kill -9 ${i};
fi
done
pkill -9 -f gunicorn

# for i in `ps -o pid,command ax | grep gunicorn | awk '!/awk/ && !/grep/ {print $1}'`
# do
# if [ "${i}" != "" ]; then
# print "Killing: ${i}";
# kill -9 ${i};
# fi
# done

# ps aux | grep gunicorn | egrep -v grep | awk '{print $2}' | xargs kill -9

0 comments on commit eeae903

Please sign in to comment.