diff --git a/statistiques/getStats.py b/statistiques/getStats.py index cdd38c4..3dc3a13 100755 --- a/statistiques/getStats.py +++ b/statistiques/getStats.py @@ -17,21 +17,8 @@ statsPath = '/srv/visio.chapril.org/statistiques' # Fonctions def runMain(): response = requests.get(api_url,timeout=1) - - current_ts = response.json()['current_timestamp'] - total_participants = response.json()['total_participants'] - bit_rate_download = response.json()['bit_rate_download'] - total_loss_degraded_participant_seconds = response.json()['total_loss_degraded_participant_seconds'] - conferences = response.json()['conferences'] - participants = response.json()['participants'] - bit_rate_upload = response.json()['bit_rate_upload'] - total_visitors = response.json()['total_visitors'] - total_conference_seconds = response.json()['total_conference_seconds'] - total_conferences_created = response.json()['total_conferences_created'] - total_failed_conferences = response.json()['total_failed_conferences'] element = datetime.datetime.strptime(response.json()['current_timestamp'],'%Y-%m-%d %H:%M:%S.%f') - tpl = element.timetuple() - timestamp = int(time.mktime(tpl)) + timestamp = int(time.mktime(element.timetuple())) with open(f'/{statsPath}/jisti_meet_stats_{timestamp}.csv','w') as fh: for (k,v) in response.json().items(): fh.write(f"{k};{v};{timestamp}\n")