aiidalab / aiidalab-widgets-base

Reusable widgets for AiiDAlab applications
MIT License
6 stars 17 forks source link

ProcessMonitor: Increase default timeout #480

Closed danielhollas closed 1 year ago

danielhollas commented 1 year ago

ProcessMonitor has a background thread that polls the process status. The default interval is now 0.1 seconds which is quite aggressive, and may potentially lead to memory leak as discussed on https://github.com/aiidalab/issues/issue/13

Here I propose to increase the default to 1.0s, since the typical AiiDA workflow will anyway take quite a bit longer. If that seems to large, perhaps 0.5s might be a good compromise? In any case, widgets can override this by passing the timeout parameter to the constructor.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (ed0fd4e) 79.32% compared to head (56be575) 79.32%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #480 +/- ## ======================================= Coverage 79.32% 79.32% ======================================= Files 27 27 Lines 3709 3709 ======================================= Hits 2942 2942 Misses 767 767 ``` | Flag | Coverage Δ | | |---|---|---| | python-3.10 | `79.32% <100.00%> (ø)` | | | python-3.8 | `79.35% <100.00%> (ø)` | | | python-3.9 | `79.35% <100.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/aiidalab/aiidalab-widgets-base/pull/480?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab) | Coverage Δ | | |---|---|---| | [aiidalab\_widgets\_base/process.py](https://codecov.io/gh/aiidalab/aiidalab-widgets-base/pull/480?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab#diff-YWlpZGFsYWJfd2lkZ2V0c19iYXNlL3Byb2Nlc3MucHk=) | `78.58% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.