Changeset 6776


Ignore:
Timestamp:
Feb 7, 2018, 11:35:09 AM (19 months ago)
Author:
mabarracus
Message:

increase sending apps

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lliurex-statistics/trunk/fuentes/lliurex-statistics.install/usr/sbin/analytics

    r4866 r6776  
    278278    f.close();
    279279
    280     global filename,url,proxy,headers;
     280    global filename,url,proxy,headers,SEND_ITEMS;
    281281   
    282282    db = sqlite3.connect(filename);
    283283    cur= db.cursor();
    284284    try:
    285         cur.execute('select * from info order by n DESC limit 100;');
     285        cur.execute('select * from info order by n DESC limit {};'.format(SEND_ITEMS));
    286286        json_tmp={};
    287287        # Dumps temporary database building json object to send
     
    328328#
    329329def show_list_db():
    330     global filename,daemon_mode,DEBUG_FILE
     330    global filename,daemon_mode,DEBUG_FILE,SEND_ITEMS
    331331    db = sqlite3.connect(filename)
    332332    cur= db.cursor()
    333333    if daemon_mode != True:
    334         print "TOP 10:"
     334        print "TOP {}:".format(SEND_ITEMS)
    335335        print "~~~~~~~~~~"
    336336        try:
    337                 cur.execute('select * from info order by n DESC limit 10;')
     337                cur.execute('select * from info order by n DESC limit {};'.format(SEND_ITEMS))
    338338                for x in cur.fetchall():
    339339                        print x[0] + " " + str(x[1]);
     
    344344        fp_debug.write("TOP 10:\n~~~~~~~~~~\n")
    345345        try:
    346                 cur.execute('select * from info order by n DESC limit 10;')
     346                cur.execute('select * from info order by n DESC limit {};'.format(SEND_ITEMS))
    347347                for x in cur.fetchall():
    348348                        fp_debug.write(x[0] + " " + str(x[1])+"\n")
     
    484484TIMEOUT=300
    485485BDTIMEOUT=300
     486SEND_ITEMS=100
    486487# Counters for threads going to timeout
    487488ctimeout=0
Note: See TracChangeset for help on using the changeset viewer.