driplineorg / dripline-python

python implementation of project8/dripline
Apache License 2.0
3 stars 6 forks source link

Documentation for how to use lockout key #120

Open raphaelcervantes opened 4 years ago

raphaelcervantes commented 4 years ago

There is an abstract description of what the dripline lockout here: https://driplineorg.github.io/dripline/branches/dl3_develop/Use-Protocol.html#lockout

However, I didn't find it enough for me to figure out how to actually implement it in a data taking script. And there doesn't seem to be an example anywhere.

Can the documentation provide a minimal example?

Here is something of a minimal example I'm trying to get to work:

dl-agent ... cmd peaches lock
somehow grab the lockout_key
dl-agent ... -k lockout_key set peaches 25
dl-agent ... -k lockout_key cmd peaches unloack
raphaelcervantes commented 4 years ago

This combination worked.

dl-agent --auth-file /etc/rabbitmq-secret/authentications.json -b rabbitmq-app cmd peaches -s lock
dl-agent --auth-file /etc/rabbitmq-secret/authentications.json -b rabbitmq-app -k ccd288e7-a6d7-4685-bcf1-948f4ddf284a set peaches 25
dl-agent --auth-file /etc/rabbitmq-secret/authentications.json -b rabbitmq-app -k ccd288e7-a6d7-4685-bcf1-948f4ddf284a cmd peaches -s unlock

Now trying to figure out how to do that with the python interface.