AS400 Queue Operation

Overview

There is a core issue with Laravel and IBM Db2 drivers in the current version of sentinel,. this means that queues will not run properly that have any large payloads teh table struct is not suitable and jbs will simply fail to load into the table called QUEUE.

The solution

The easiest way to fix this issue is not to use DB2 for queue operation but switch to REDIS the REDIS sever has been installed on MEDIDEV and can now be used to Caching, sessions and also more importantly QUEUES.

The entries in the env file set these to use redis as opposed to database, file system or array.

One further issue when using Maximo with cron is that cron has no concept of the Oracle Environment Variables we are devising a solution for this issue.

current cron entries for MEDIDEV

SHELL=/QOpenSys/pkgs/bin/bash
PATH=/QOpenSys/pkgs/bin:/QOpenSys/usr/sbin:/QOpenSys/usr/bin
MAILTO=qsecofr
APPLICATION_ENV=dev

# For details see man 4 crontabs

# Example of job definition:

# .---------------- minute (0 - 59)

# | .------------- hour (0 - 23)

# | | .---------- day of month (1 - 31)

# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...

# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat

# | | | | |

#    *  *  *  *  * user-name  command to be executed

* * * * * pricedx1 php /www/laravel/htdocs/artisan schedule:run
*/1 * * * * pricedx1 php /www/laravel/htdocs/artisan queue:work --max-time=30

This means that the cron job runs every minute and then for a maximum of 30 seconds, if there are no jobs to process then the queue:work command will quite.

in most cases a maximum of 3 crn jobs will run on the AS400 1, for the schedule and then two for the queue:work command if the --max-time parameter is removed then the queue:work command does not quit and you end up with lots of cron jobs running which is not ideal as this will kill system resources and slow the AS400 server.