ISISComputingGroup / ISISComputingGroup/IBEX

genie_python: Alert if something times out

Open
#5,278 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
6
Forks
2
Avg merge
16h 40m
Merged PRs (30d)
2

Description

As an instrument scientists I want an alert if an area of code takes too long to execute, so that I am informed if some part of the code has hung, e.g. #5277

### Acceptance criteria

- I can decorate a function with a time value after which I will receive repeated alerts
- I can use a with statement around line of code after which I will receive repeated alerts

### notes

Something like

```
with alert(minutes=5, text="Code stuck", to=555123):
g.cset("freq10", 10)
g.waitfor_block("freq10", 10, 9.5, 10.5)
```

or

```
@alert(minutes=5, text="Code stuck", to=555123)
def set_freq(freq)
g.cset("freq10", freq)
g.waitfor_block("freq10", freq, freq - 0.5, freq + 0.5)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.