Skip to content

Commit

Permalink
Add timeout arg to update methods in pvarch classes
Browse files Browse the repository at this point in the history
  • Loading branch information
xresende committed Mar 7, 2024
1 parent c2035de commit 01a6405
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions siriuspy/siriuspy/clientarch/pvarch.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,11 @@ def is_archived(self):
return False
return True

def update(self):
def update(self, timeout=None):
"""."""
self.connect()
if timeout is not None:
self.timeout = None
data = self.connector.getPVDetails(self.pvname)
if not data:
return False
Expand Down Expand Up @@ -280,9 +282,11 @@ def severity(self):
"""Severity data."""
return self._severity

def update(self, mean_sec=None, parallel=True):
def update(self, mean_sec=None, parallel=True, timeout=None):
"""Update."""
self.connect()
if timeout is not None:
self.timeout = None
if None in (self.timestamp_start, self.timestamp_stop):
print('Start and stop timestamps not defined! Aborting.')
return
Expand Down Expand Up @@ -493,9 +497,11 @@ def parallel_query_bin_interval(self, new_intvl):
self._pvdata[pvname].parallel_query_bin_interval = \
self._parallel_query_bin_interval

def update(self, mean_sec=None, parallel=True):
def update(self, mean_sec=None, parallel=True, timeout=None):
"""Update."""
self.connect()
if timeout is not None:
self.timeout = None
if None in (self.timestamp_start, self.timestamp_stop):
print('Start and stop timestamps not defined! Aborting.')
return
Expand Down

0 comments on commit 01a6405

Please sign in to comment.