Files
sf-op/script/Tools/save_snapshot_client.py
2017-11-02 08:53:26 +01:00

10 lines
403 B
Python

def save_snapshot(camera_name = "SLG-LCAM-C041", shared = True, logbook = "SwissFEL commissioning data", comment = ""):
import requests
base = "http://sf-daq-mgmt:8090/"
url = base + "run/Tools/save_snapshot(%s,%s,%s,%s)" % (camera_name, str(shared), logbook, "'" + str(comment) + "'")
r = requests.get(url)
if r.status_code != 200:
raise Exception(r.text)
save_snapshot()