aces / cbrain

CBRAIN is a flexible Ruby on Rails framework for accessing and processing of large data on high-performance computing infrastructures.
GNU General Public License v3.0
71 stars 42 forks source link

[ADD] launching task arrays by selecting multiple files in New Boutiques #1298

Open natacha-beck opened 1 year ago

natacha-beck commented 1 year ago

Closed #1201

natacha-beck commented 1 year ago

Double check all his, I really am not sure it works.

It was tested and seems to work properly when I did the PR. I renamed some variable and remove the next. I do not see the point of the next neither.

I tested with multiple files selected (3 files selected as inputs --> Produce 3 tasks), I also verify that using a CbrainFileList work ok too.

natacha-beck commented 1 year ago

Oups still have to cache the value. Will do.

prioux commented 1 year ago

The original 'next nil' statement was meant to replace in-situ a bad userfile ID in a File input.

Your code no longer does that.

Also, instead of looking up each and every file with a find_accessible_by_user, why don't you get them all in one shot? That way if you have 1000 file entries you're not going top make 1000 requests to the database.

prioux commented 1 year ago

I will need to review this carefully, just a read of the code is not enough for me to approve it. The changes are too complex and subtle.