diff --git a/src/monitor.py b/src/monitor.py index 632934d..bad19ac 100755 --- a/src/monitor.py +++ b/src/monitor.py @@ -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 diff --git a/src/utils/workers.py b/src/utils/workers.py index a576b00..1382320 100644 --- a/src/utils/workers.py +++ b/src/utils/workers.py @@ -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