In sentiment trending, if there are no providers in the today\'s set, get data from random providers

This commit is contained in:
Mokaddem 2016-08-20 18:14:19 +02:00
parent 2ed60cb9bf
commit ee8f26c7c4
2 changed files with 11 additions and 3 deletions

View file

@ -509,7 +509,13 @@ def sentiment_analysis_getplotdata():
dateStart_timestamp = calendar.timegm(dateStart.timetuple())
to_return = {}
for cur_provider in r_serv_charts.zrangebyscore('providers_set_'+ get_date_range(0)[0], '-inf', '+inf', start=0, num=8):
range_providers = r_serv_charts.zrangebyscore('providers_set_'+ get_date_range(1)[1], '-inf', '+inf', start=0, num=8)
if range_providers == []:
print 'today provider empty'
range_providers = r_serv_charts.smembers('all_provider_set')
for cur_provider in range_providers:
print cur_provider
cur_provider_name = cur_provider + '_'
list_date = {}
for cur_timestamp in range(int(dateStart_timestamp), int(dateStart_timestamp)-sevenDays-oneHour, -oneHour):

View file

@ -309,10 +309,12 @@ $(document).ready(function () {
refresh();
update_values();
if($('#button-toggle-queues').prop('checked'))
if($('#button-toggle-queues').prop('checked')){
create_queue_table();
else
}
else{
$("#queueing").html('');
}
for (i = 0; i < (glob_tabvar.row1).length; i++){