Script execution

This commit is contained in:
2019-10-10 14:29:40 +02:00
parent c6880d2052
commit f633bb00c0

View File

@@ -6,19 +6,31 @@ providers, streams = [], []
for i in range(9000, 9008):
p = Provider("Provider"+str(i),"tcp://SFTEST-CVME-DBPM1:"+str(i), SocketType.PULL)
p.initialize()
providers.add(p)
providers.append(p)
s = Stream("Stream"+str(i), p)
s.initialize()
streams.add(s)
streams.append(s)
def check(s):
print "Starting checking " + s.getName()
pid = s.take().pulseId
while(True):
s.waitCacheChange(10000)
p=s.take().pulseId
if p!= pid + 1:
print s.getName() + " error: received pid %d, expecting %d" % (p, (pid + 1))
pid = p
try:
for s in streams:
s.start(True)
s.waitCacheChange(5000)
print s.getName() + " channels:" + str(s.getIdentifiers())
args = []
for s in streams:
args.append((check,(s,)))
parallelize(*args)
finally:
try:
for s in streams: