Exec from custom module

@patrick no luck on this yet.

Here is what is working:

When setting up the bull queue, I specify that the processQueue function be run each time a job is added to the queue. That function does a POST to a Wappler api link.

webhookQueue = new Queue('webhook-queue');

webhookQueue.process(async (job) => {
     return await processQueue(job, this.global.data.$_SERVER.BASE_URL, '/api/events/members/member_updated');
    
});

function processQueue(job, base_url, api_path) {

    return new Promise((resolve, reject) => {
        axios
            .post(base_url + api_path, job)
            .then(res => {
                resolve();
            })
            .catch(error => {
                console.error(error)
            });

    });

}

I was thinking I could modify the processQueue function so that it would load a library file instead of a POST request. I tried the this.exec which indeed finds the file, but the steps are not executed.

If you don’t have some simple solution to this, I’ll just stick with what is working – I am only trying to optimize at this point.