Conversation
Uploaded files automatically get assigned HT08 considering HT08 does not exist anymore, it will be time efficient to auto-assign to HT09 since testing should ramp up
| push: | ||
| branches: | ||
| - main | ||
| - mps-fix |
There was a problem hiding this comment.
do we need mps-fix post merge?
There was a problem hiding this comment.
no, i will remove later
| if runModel.MpsRecord == nil { | ||
| runModel.MpsRecord = make(map[string]interface{}) | ||
| } | ||
| // mpsMetadata := make(map[string]interface{}) |
There was a problem hiding this comment.
oh, was gonna ask you abt this actually.
we need to leave the commented code in if we wanted to be able to update MPS records with an HTTP request to the server. i personally don't want to have that functionality but what do you think
| } | ||
| scripts := strings.Split(scriptsParam, ",") | ||
|
|
||
| versionParam := r.URL.Query().Get("version") |
There was a problem hiding this comment.
What is version in this context?
There was a problem hiding this comment.
the matlab scripts will all be packaged together into 1 package to be deployed onto MPS. version refers to the package version
| @@ -285,6 +285,11 @@ func (h *mcapHandler) ProcessMatlabJob(w http.ResponseWriter, r *http.Request) * | |||
| } | |||
| scripts := strings.Split(scriptsParam, ",") | |||
There was a problem hiding this comment.
if scripts is referring to MATLAB scripts, we should rename it to be more descriptive.
There was a problem hiding this comment.
dy want me to rename the query param too or just the variable?
|
|
||
| switch scriptResult.Type { | ||
| case "mat", "image": | ||
| // scriptResult.Result = /data/mps_generated/file_name.mat |
There was a problem hiding this comment.
oh i wanted to give an example of scriptResult.Result for future reference
| log.Fatalf("generated file does not exist: %s", mpsGeneratedFileLocation) | ||
| } | ||
|
|
||
| // copy the generated file to the local s3 cache directory |
There was a problem hiding this comment.
Can't we just simplify logic by just moving the file withos.Rename?
There was a problem hiding this comment.
bc we are moving files across docker volumes, os.Rename doesn't work so we have to unfortunately copy it over manually
| func (m *MatlabClient) pollForResults() { | ||
| // Polls the MPS for the result of a job until it is ready | ||
| // Once it's ready, it processes the job result and then deletes it off MPS | ||
| func (m *MatlabClient) pollForJobResult(mpsJob mpsJob, s3Repo *s3.S3Repository) { |
There was a problem hiding this comment.
We may want to include a timeout here just in case.
There was a problem hiding this comment.
we can set a timeout on the MPS side.
so if a script doesn't finish by X time, it will cancel the execution and say that it timed out which can be handled here.
title