Ignore:
Timestamp:
Nov 30, 2016, 4:04:39 PM (4 years ago)
Author:
mabarracus
Message:

Add debug verbosity
Fixes confirmator logic
Fixes acl's

File:
1 edited

Legend:

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

    r2948 r2962  
    7979            # Send data to master server
    8080            send_data()
     81        else:
     82            debug("Sending not allowed when try to change file")
    8183        # Get new temporary filename
    8284        next_filename=get_filename(LOGPATH)
     
    108110        try:
    109111            if answer == "yes":
     112                debug("allow_send stats by check local acknowledge")
    110113                return True
    111114            else:
     115                debug("deny allow_send stats by check server & local acknowledge")
    112116                return False
    113117        except Exception as e:
     118            debug("deny allow_send stats by exception check server & local acknowledge")
    114119            return False
    115120    else:
     121        debug("allow_send stats by check server acknowledge")
    116122        return True
    117123#END def allow_send()
     
    129135            # Send data to master server
    130136            send_data()
     137        else
     138            debug("Sending not allowed when try send file")
    131139        # Clear database file
    132140        clear_db()
     
    279287    jsonobj=json.dumps({'uid':uid,'vers':version,'sab':sabor, 'stats': jsonobj });
    280288    payload = {'stats':jsonobj};
     289    try:
     290        debug("SENDING DATA:"+str(payload))
     291    except Exception as e:
     292        debug("Error debugging data to send")
     293
    281294    r = requests.post(url,data=payload,headers=headers);
    282295    debug("S("+r.text+')',2);
Note: See TracChangeset for help on using the changeset viewer.