Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
MikeW
Creator
Creator

REST API: Priority Parameter in TaskExecutionConfig

Does higher number gets higher priority or does lower number gets higher priority? 

https://help.qlik.com/en-US/nprinting/November2019/APIs/NP+API/index.html?page=109 

Thanks

Labels (2)
1 Solution

Accepted Solutions
Ruggero_Piccoli
Support
Support

Hi,

1000 is the maximum priority. There are other optimization rules that determine the execution sequence and I don't know if we will made them public. In any case you can set API execution requests to 1000 to give them the maximum possible priority.

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.

View solution in original post

4 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

judging by my observation all metadata generation tasks get 1000 priority, and publish tasks 500... I would assume higher number gets priority. 

I am not sure however what do you need this information for as API does not allow you to set it. It only allows you to get it (similar to what you see in task overview).

thanks

Lech

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
MikeW
Creator
Creator
Author

The POST /tasks/{taskid}/executions  takes this config as an optional request body. 

I was able to pass it as a parameter when executing the POST call and can see the specified priority in the execution status. I ran it a bunch of times, but I didn't have enough server load to see any difference in how fast NPrinting got to my task. 

Here is the call I used.

		RestNPTaskTriggerTable:
		SQL SELECT
    		"__KEY_data",
    		"id",
    		"task",
    		"status"
		FROM JSON (wrap off) "data" PK "__KEY_data"
		WITH CONNECTION( 
        	URL "$(vEndpoint)", 
            HTTPHEADER "cookie" "$(vCookie)",
			HTTPHEADER "Origin" "$(vL.NPAPIOrigin)",
			HTTPHEADER "Content-Type" "application/json;charset=UTF-8",
			BODY "{""priority"":1000}"
        );

 

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

hi @MikeW ,you are right,

let me play with it and check if there is any usability of this parameter

cheers

LEch

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Ruggero_Piccoli
Support
Support

Hi,

1000 is the maximum priority. There are other optimization rules that determine the execution sequence and I don't know if we will made them public. In any case you can set API execution requests to 1000 to give them the maximum possible priority.

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.