Skip to content

Commit

Permalink
Update YAPI exception notes.
Browse files Browse the repository at this point in the history
Update the notes on the occasional YAPI exceptions - which seem to
be caused to USB host side issues.
  • Loading branch information
Alexander Schreiber committed Jan 19, 2023
1 parent 6273b06 commit 10978ee
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions yocto_exporter
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,12 @@ def main():
collect_gauges(sensor_log=args.sensor_log)
except y_a.YAPI_Exception:
# Catch and restart the hub session. Catch & ignore meant that
# the afflicted module (always the light sensor) is stuck at the
# last value. Restarting the exporter always fixed it, so
# doing the unregister/register should do the same.
# the afflicted module (usually the light sensor) is stuck at the
# last value. Restarting the exporter always fixed it, and
# doing the unregister/register does the same.
# These hangups have only been seen with ARM machines (e.g.
# some Raspberry Pi boards and some others, I suspect some
# funkiness in the host side USB stack.
syslog.syslog('Caught YAPI exception, trying to restart')
yapi_exceptions.inc()
# try to re-register
Expand Down

0 comments on commit 10978ee

Please sign in to comment.