Issue while setting up Job Priority

Hey Everyone,
I was trying to setup job-priority while transfering dicom with peer-2-peer through Lua.
The script throw error saying : Bad file format: Integer value expected in field: Priority .
Below I am attaching my lua -script and logs .
Please let me know. Am I doing something wrong or Is there any better way to perform such operation
Thankyou .

Lua Script :
function OnStableStudy(studyId, tags, metadata)
local moveRequest = {}
moveRequest[“Resources”] = {}
moveRequest[“Priority”] = 1
table.insert(moveRequest[“Resources”], studyId)
moveRequest[“Asynchronous”] = true
PrintRecursive(moveRequest)
RestApiPost(“/peers/Middle/store”, DumpJson(moveRequest, true))
end

Logs :

1 Like

Hi,

In your case, you should just use DumpJson(moveRequest) and drop the true argument.

Best regards,

Alain.

@alainmazy Thankyou. I have one more question. Is that any way to setup lower job priority while deleting the dicom. Or any other way to setup at a job-scheduler to run at specific time to delete some dicoms.

Hi,

The Delayed Deletion Plugin might help.

Alain.

Hey @alainmazy
thankyou for suggestion. Will look into this.
Regards Ankush