NMIS 9 has performed a big change VS nmis 8 where the main process was executed by a cron job.
NMIS 9 works as a service and a main process - the scheduler - redirect all the jobs to a queue. It allows to control the priority, between other improvements.
The scheduler starts a number of workers that perform the jobs in the queue.
What the scheduler has? We can have a look at the jobs in progress and scheduler with the following command:
We can remove the scheduled jobs or one specific job with the following:
Controlling the nmis workers
We can control the number of workers with the following parameters in nmis9/conf/Config.nmis file:
Max number of workers
The max number of child processes is controlled by the following parameter:
By default, a worker is started by the scheduler and the process will not die while the parent process is alive.
The process will sleep for 30 default seconds is it doesn't have any job to perform. This can be changed with the following parameter:
We can change the default behaviour so the worker is killed every N cycles. Another process will be started by the parent once the child process reaches the max cycles, if the number of children processes doesn't reach the max_workers.
The main process will sleep for 10 seconds once it finishes to review all the workers and sends the jobs to the queue. We can control the number of seconds the scheduler is sleeping with the following parameter: