Information Classification: External Restricted.
See https://www.chili-publish.com/security
Asynchronous Tasks
Heavy tasks such as PDF generation, font compilation, preview generation, etc. are processed in background queues, and might not always return immediate results (but rather a task ID, which can be used to monitor the results).
The background tasks are handled by a Windows Service, which monitors an input Queue.
This Windows Service can run multiple tasks simultaneously.
Creating Tasks
Creation of tasks is usually done behind the screens when calling a function (or requesting a resource). In such cases, a priority is also assigned (a number between 1 and 10). Number 1 has the highest priority and number 10 has the lowest priority:
A value over 10 will default to the maximum (10).
A value lower than 1 will mean that the task is executed not asynchronously, but rather that the webservice call will immediately execute it and return the result. THIS IS NOT RECOMMENDED USAGE OF THE TASKS! Please only use this if there is no other alternative for your workflow.
Default Priorities
When creating your own tasks, you can assign a priority. Depending on the importance of the task, you can work around the following default priorities. They have been assigned based on the importance of the request to the user
- Image Preview Requested in CHILI Editor: 2
- Font Requested in CHILI Editor: 2
- Temp PDF generated from CHILI Editor: 4
- Thumbnail requested in CHILI Backoffice: 5
- Generating all previews of a newly created item: 7
Whenever a task is added to the queue, CHILI will check to see if a similar task (combination of the resourceitem + tasktype) already exists. If so, the existing task will be returned. If the existing task has a lower priority, it will be modified and its priority will be increased to represent the importance of the new request.
Preview URLs
By default, preview URLs are handled synchronously. This means that a preview which does not yet exists is created automatically and returned to the client.
CHILI Backoffice and CHILI Editor usually call the resources asynchronously, though, so that the web requests for the resources do not block any other user requests if they dont exist yet (for example when getting the thumbnails of an entire directory in the backoffice).
To get an asynchronous preview URL, you can use the normal preview URL, and append the following arguments to the QueryString:
&async=true&taskPriority=XXX
In this case, the download page will return a task XML if the resource does not exist yet (which you can monitor using the functions described below)
PDF Creation
The various PDF creation functions always run as a background task. In the functions DocumentCreatePDF and DocumentCreateTempPDF you can specify a priority for the task. The functions will return a task XML, which can be monitored later on.
The API Sample application contains the possibility to generate either a single PDF or multiple PDF files at once, and monitors the results for this creation.
Monitoring Tasks
To monitor tasks using the API, you can use the TaskGetStatus or TasksGetStatusses functions. These will return the current status of the task(s), and eventually report on the result as well (once finished="true" in the returned XML)
The backoffice also provides you with a way to monitor the status of the Queue (in the Server>Queue menu)
All information on this page must be treated as External Restricted, or more strict. https://www.chili-publish.com/security