From f0131dcc3b40089ad3129535aa9c3f4965452c39 Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@gmail.com>
Date: Fri, 06 Jan 2017 22:50:29 +0000
Subject: [PATCH] Some small bugs fixed in trisurf.py. Added possibility to run custom analyses from config. see networkedExample.py

---
 networkedExample.py |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/networkedExample.py b/networkedExample.py
index b444447..00bb8d9 100755
--- a/networkedExample.py
+++ b/networkedExample.py
@@ -19,10 +19,18 @@
 run3.setSubdir("run2")
 
 
-
 Runs=[run2, run3]
 
-hosts=({'name':'Hestia','address':'kabinet.penic.eu', 'runs':Runs, 'username':'samo'},
-	{'name':'altea','address':'127.0.0.1', 'runs':Runs, 'username':'samo'})
+#this is how analyses are defined
+def analyze(run, **kwargs):
+	host=kwargs.get('host', None)
+	print("Analysis on host "+host['name']+" for run "+run.Dir.fullpath()+" completed")
 
-tsmgr.start(hosts)
+
+
+
+hosts=({'name':'natalie','address':'kabinet.penic.eu', 'runs':Runs, 'username':'samo'},
+	{'name':'Hestia','address':'127.0.0.1', 'runs':Runs, 'username':'samo'})
+
+analyses={'analysis1':analyze,}
+tsmgr.start(hosts, analyses=analyses)

--
Gitblit v1.9.3