Skip to content

Commit

Permalink
Add getRecentlyModifiedPVs method to ClientArchiver
Browse files Browse the repository at this point in the history
  • Loading branch information
xresende committed Mar 7, 2024
1 parent a6d441d commit 3e886ef
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion siriuspy/siriuspy/clientarch/client.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#!/usr/bin/env python-sirius
"""Fetcher module.
See https://slacmshankar.github.io/epicsarchiver_docs/userguide.html
See
https://slacmshankar.github.io/epicsarchiver_docs/userguide.html
http://slacmshankar.github.io/epicsarchiver_docs/details.html
http://slacmshankar.github.io/epicsarchiver_docs/api/mgmt_scriptables.html
"""

from threading import Thread as _Thread
Expand Down Expand Up @@ -134,6 +137,18 @@ def getPausedPVsReport(self):
resp = self._make_request(url, return_json=True)
return None if not resp else resp

def getRecentlyModifiedPVs(self, limit=None):
"""Get recently modified PVs.
Currently version of the epics archiver appliance returns pvname
list from oldest to newest modified timestamps."""
method = 'getRecentlyModifiedPVs'
if limit is not None:
method += f'?limit={str(limit)}'
url = self._create_url(method=method)
resp = self._make_request(url, return_json=True)
return None if not resp else resp

def pausePVs(self, pvnames):
"""Pause PVs."""
if not isinstance(pvnames, (list, tuple)):
Expand Down

0 comments on commit 3e886ef

Please sign in to comment.