bug fix: summary of folder analysis

master
Steve L. Nyemba 8 years ago
parent 44290fe532
commit a9d1ad6d68

@ -286,7 +286,7 @@ class FileWatch(Analysis):
xo_raw = self.evaluate(folder)
xo = np.array(ML.Extract(['size','age'],xo_raw))
xo = {"label":folder,"details":xo_raw,"summary":{"size":round(np.mean(xo[:,0]),2),"age":round(np.mean(xo[:,1]),2),"count":len(xo[:,1])}}
xo = {"label":folder,"details":xo_raw,"summary":{"size":round(np.sum(xo[:,0]),2),"age":round(np.mean(xo[:,1]),2),"count":len(xo[:,1])}}
xo['day'] = now.day
xo['month'] = now.month
xo['year'] = now.year

@ -180,7 +180,7 @@ class FileWatchWorker(BasicWorker):
xo_age = [row['age'] for row in xo[0]['details']]
xo_size= [row['size'] for row in xo[0]['details']]
xo[0]['details'] = {"age":ML.distribution(xo_age,self.lock),"size":ML.distribution(xo_size,self.lock)}
xo[0]['details'] = {"id":id, "age":ML.distribution(xo_age,self.lock),"size":ML.distribution(xo_size,self.lock)}
#
# Now we can save the file

Loading…
Cancel
Save