helgestein / helao-pub

hierachical automation of the natural sciences
MIT License
20 stars 5 forks source link

Kadi: is file in record? #15

Closed EpSch closed 3 years ago

EpSch commented 3 years ago

I noticed this, https://github.com/helgestein/helao-dev/blob/master/driver/kadi_driver.py#L83-L90 I recently implemented this: https://gitlab.com/iam-cms/kadi-apy/-/blob/master/kadi_apy/lib/resources/records.py#L320-327 which uses just one request. Maybe you can check if this also works for you

darthlegit commented 3 years ago

Pagination is what you told me I needed to use back in October. I will see about updating this. Is there an equivalent function for finding records in collections?

EpSch commented 3 years ago

Sure, in October it was the way to go.. now there is the better solution ;) just as a suggestion ;)

darthlegit commented 3 years ago

I will definitely do it.

EpSch commented 3 years ago

"Is there an equivalent function for finding records in collections?"

At the moment not.. do you need it?

darthlegit commented 3 years ago

No, but i thought for a second that I did...

darthlegit commented 3 years ago

Oh right, the other case in which we are using pagination is in downloads. Let me know if there becomes a more efficient way to list all files in a record, or all records linked to a collection.

darthlegit commented 3 years ago

In any case, I think with the incoming change to our code, speed will not be an issue either way

EpSch commented 3 years ago

Oh right, the other case in which we are using pagination is in downloads. Let me know if there becomes a more efficient way to list all files in a record, or all records linked to a collection.

You that, still pagination will be the way to go..

EpSch commented 3 years ago

In any case, I think with the incoming change to our code, speed will not be an issue either way

great