Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update src/fairy.coffee,src/web/fairy.coffee,src/web/fairy.html

  • Loading branch information...
commit 65ce3db1ffd9ee3e09be6a6f5ad63735cf3d55eb 1 parent a545fec
Wang Ling authored
Showing with 4 additions and 4 deletions.
  1. +2 −2 src/fairy.coffee
  2. +1 −1  src/web/fairy.coffee
  3. +1 −1  src/web/fairy.html
View
4 src/fairy.coffee
@@ -498,8 +498,8 @@ class Queue
@redis.multi()
.hdel(@key('PROCESSING'), processing)
.hincrby(@key('STATISTICS'), 'FINISHED', 1)
- .hincrby(@key('STATISTICS'), 'total_pending_time', start_time - task[task.length - 1])
- .hincrby(@key('STATISTICS'), 'total_process_time', process_time)
+ .hincrby(@key('STATISTICS'), 'TOTAL_PENDING_TIME', start_time - task[task.length - 1])
+ .hincrby(@key('STATISTICS'), 'TOTAL_PROCESS_TIME', process_time)
.lpush(@key('RECENT'), JSON.stringify([task..., finish_time]))
.ltrim(@key('RECENT'), 0, @recent_size - 1)
.zadd(@key('SLOWEST'), process_time, JSON.stringify([task..., start_time]))
View
2  src/web/fairy.coffee
@@ -6,7 +6,7 @@ statistics_template = [
'<tbody>',
'<% _.each(data, function(item){ %>',
'<tr>',
- '<td><%= item.name %></td><td><%= item.workers%></td><td><%= item.average_pending_time%></td><td><span><%= item.total.tasks%></span><span>/</span><span><%= item.total.groups%><span></td><td><%= item.finished_tasks%></td><td><%= item.processing_tasks%></td><td><%= item.pending_tasks%></td><td><%= item.failed_tasks%></td><td><span><%= item.blocked.tasks%></span><span>/</span><span><%= item.blocked.groups%><span></td><td><button class="btn_reschedule">Schedule</button></td><td><button class="btn_clear">Clear</button></td>',
+ '<td><%= item.name %></td><td><%= item.workers%></td><td><%= item.average_pending_time + item.average_process_time%></td><td><span><%= item.total.tasks%></span><span>/</span><span><%= item.total.groups%><span></td><td><%= item.finished_tasks%></td><td><%= item.processing_tasks%></td><td><%= item.pending_tasks%></td><td><%= item.failed_tasks%></td><td><span><%= item.blocked.tasks%></span><span>/</span><span><%= item.blocked.groups%><span></td><td><button class="btn_reschedule">Schedule</button></td><td><button class="btn_clear">Clear</button></td>',
'</tr>',
'<%})%>',
'</tbody>',
View
2  src/web/fairy.html
@@ -79,7 +79,7 @@
<tr><th>Total</td><th><%= statistics.finished_tasks %></td></tr>
<tr><th>Avg. Waiting In</th><td><%= statistics.average_pending_time %></td></tr>
<tr><th>Avg. Processing In</th><td><%= statistics.average_process_time %></td></tr>
- <tr><th>Avg. Finished In</th><td><%= (Number(statistics.average_pending_time)+Number(statistics.average_process_time))?(Number(statistics.average_pending_time)+Number(statistics.average_process_time)).toFixed(2):'-'%></td></tr>
+ <tr><th>Avg. Finished In</th><td><%= statistics.average_pending_time + statistics.average_process_time%></td></tr>
</table>
</script>
Please sign in to comment.
Something went wrong with that request. Please try again.