mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 11:27:09 +00:00
This code implements the backend processing side of the ASAQC queue, i.e., the bit that communicates with the remote API. Its expected use it to have it running at regular intervals, e.g., via cron. The entry point is: lib/www/server/queues/asaqc/index.js That file is executable and can be run directly from the shell or within a script. Read the comments in that file for further instructions.
30 lines
751 B
JavaScript
Executable File
30 lines
751 B
JavaScript
Executable File
#!/usr/bin/node
|
|
|
|
/*
|
|
* Can be required as a module or called directly.
|
|
*
|
|
* In the latter case, it will do a queue run.
|
|
*
|
|
* The following environment variables may come in
|
|
* useful:
|
|
*
|
|
* DOUGAL_ROOT Use it to specify the path to Dougal's
|
|
* top directory (`software/`). Most of the time this
|
|
* is not needed unless running in a development
|
|
* environment.
|
|
*
|
|
* NODE_TLS_REJECT_UNAUTHORIZED=0 Use this when running
|
|
* against the internal test server or any other endpoint
|
|
* that has self-signed certificates. WARNING: think carefully
|
|
* if you really want to do this, most of the time you don't.
|
|
*/
|
|
|
|
module.exports = {
|
|
processQueue: require('./process')
|
|
}
|
|
|
|
|
|
if (!module.parent) {
|
|
module.exports.processQueue().then(() => process.exit());
|
|
}
|