Browse Source

quick updates

develop
Rob Colbert 2 years ago
parent
commit
85eb7346da
  1. 16
      .env.default
  2. 28
      app/workers/host-services.js
  3. BIN
      client/img/icon/volcano.nicecrew.png
  4. 2
      start-local

16
.env.default

@ -9,6 +9,22 @@ DTP_SITE_DOMAIN_KEY=
DTP_SITE_COMPANY=Digital Telepresence, LLC
DTP_PASSWORD_SALT=
#
# host services options
#
DTP_HOST_EXPIRE_TRANSACTIONS=enabled
DTP_HOST_EXPIRE_TRANSACTIONS_CRON=*/5 * * * * *
DTP_HOST_CACHE_CLEAN=enabled
DTP_HOST_CACHE_CLEAN_CRON=*/30 * * * * *
DTP_HOST_STATS_REPORT=enabled
DTP_HOST_STATS_REPORT_CRON=*/5 * * * * *
DTP_HOST_EXPIRE_HOSTS=enabled
DTP_HOST_EXPIRE_HOSTS_CRON=*/20 * * * * *
#
# Mailgun Configuration
#

28
app/workers/host-services.js

@ -635,20 +635,32 @@ module.expireNetHosts = async ( ) => {
module.log.info('starting transaction manager');
module.manager = new TransactionManager();
module.expireJob = new CronJob('*/5 * * * * *', module.expireTransactions, null, true, CRON_TIMEZONE);
if (process.env.DTP_HOST_EXPIRE_TRANSACTIONS === 'enabled') {
const expireTransactionsCron = process.env.DTP_HOST_EXPIRE_TRANSACTIONS_CRON || '*/5 * * * * *';
module.expireJob = new CronJob(expireTransactionsCron, module.expireTransactions, null, true, CRON_TIMEZONE);
}
/*
* Worker startup
*/
const cleanCronJob = process.env.DTP_HOST_CACHE_CLEAN_CRON || '*/30 * * * * *';
module.log.info('starting host cache clean cron', { cleanCronJob });
module.cleanupJob = new CronJob(cleanCronJob, module.cleanHostCache, null, true, CRON_TIMEZONE);
if (process.env.DTP_HOST_CACHE_CLEAN === 'enabled') {
const cleanCronJob = process.env.DTP_HOST_CACHE_CLEAN_CRON || '*/30 * * * * *';
module.log.info('starting host cache clean cron', { cleanCronJob });
module.cleanupJob = new CronJob(cleanCronJob, module.cleanHostCache, null, true, CRON_TIMEZONE);
}
module.log.info('starting stats report job');
module.statsReportJob = new CronJob('*/5 * * * * *', module.reportHostStats, null, true, CRON_TIMEZONE);
if (process.env.DTP_HOST_STATS_REPORT === 'enabled') {
module.log.info('starting stats report job');
const statsReportCron = process.env.DTP_HOST_STATS_REPORT_CRON || '*/5 * * * * *';
module.statsReportJob = new CronJob(statsReportCron, module.reportHostStats, null, true, CRON_TIMEZONE);
}
module.log.info('starting host expiration job');
module.expireHostsJob = new CronJob('*/20 * * * * *', module.expireNetHosts, null, true, CRON_TIMEZONE);
if (process.env.DTP_HOST_EXPIRE_HOSTS === 'enabled') {
module.log.info('starting host expiration job');
const expireHostsCron = process.env.DTP_HOST_EXPIRE_HOSTS_CRON || '*/20 * * * * *';
module.expireHostsJob = new CronJob(expireHostsCron, module.expireNetHosts, null, true, CRON_TIMEZONE);
}
module.log.info('registering host with DTP Sites platform', { });
await module.registerHost();

BIN
client/img/icon/volcano.nicecrew.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

2
start-local

@ -1,7 +1,7 @@
#!/bin/bash
MINIO_ROOT_USER="webapp"
MINIO_ROOT_PASSWORD="302888b9-c3d8-40f5-92de-6a3c57186af5"
MINIO_ROOT_PASSWORD="1f1c7c9b-b833-4462-ae41-d56f52faa49c"
export MINIO_ROOT_USER MINIO_ROOT_PASSWORD
forever start --killSignal=SIGINT app/workers/host-services.js

Loading…
Cancel
Save