Closed lcontami closed 5 years ago
This should not happen since when a measurement is running the profile of the card should not be available and the check should be skipped.
Do you have an idea of why the checks are called ? Are not all the instruments using the same legacy starter ?
This occurs when enqueuing a new measurement while one is running correct ? The checks on the tasks are always called but the connection to the instrument is checked only if the instrument profile is part of the run_time infos. To debug this I would suggest the following:
Depending on those we will have to explore different directions.
Actually I just realized it happens when you enqueue a new measurement while one is running STARTING FROM THE SECOND you enqueue. Meaning you can enqueue one but not two. So i guess it has something to do with the way the checks are skipped ? I have not read your insights yet Madar, just wanted to update this asap, but I will try and find time !
That's interesting ! Now it sounds more like a bug in the management of the dependencies. It also means that I can investigate without having the instrument. The card is stricter than other instruments, which is why we only see the bug with it. My guess is that we release all the resources we tried to collect no matter whether we got them or not, which is a bad idea. I think that most of the logic is in Measurement. I may have some time tonight, I will try to give it a look.
This should be fixed by https://github.com/Exopy/exopy/pull/161
When a measurement is already running, the checks fail since they try to open the connection.