#!/usr/bin/env python

import time
import datetime
import omero

PIXELS_ID = 9072

def ping(tstore, sleep=0):
	print "Sleeping for %d seconds..." % sleep
	time.sleep(sleep)
	print "Ping at: %s" % datetime.datetime.now()
	tstore.setPixelsId(PIXELS_ID)
	tstore.resetDefaults()

a = ["--Ice.Config=../../etc/omero.config"]
c = omero.client(args=a)
c.createSession()
tstore = c.sf.createThumbnailStore()

ping(tstore)
ping(tstore, 15)
ping(tstore, 30)
ping(tstore, 60)
ping(tstore, 120)
ping(tstore, 240)
ping(tstore, 360)
ping(tstore, 480)
ping(tstore, 600)
ping(tstore, 720)
