1
0
Fork 0
mirror of synced 2024-06-29 11:40:45 +12:00

Added empty certs worker

This commit is contained in:
Eldad Fux 2020-02-19 14:12:48 +02:00
parent 009a24189b
commit 7faedecbe4
3 changed files with 54 additions and 0 deletions

View file

@ -28,6 +28,7 @@ $services = include __DIR__.'/config/services.php'; // List of services
$webhook = new Event('v1-webhooks', 'WebhooksV1');
$audit = new Event('v1-audits', 'AuditsV1');
$usage = new Event('v1-usage', 'UsageV1');
$certs = new Event('v1-certs', 'CertsV1');
/**
* Get All verified client URLs for both console and current projects

38
app/workers/certs.php Normal file
View file

@ -0,0 +1,38 @@
<?php
require_once __DIR__.'/../init.php';
cli_set_process_title('Certs V1 Worker');
echo APP_NAME.' certs worker v1 has started';
class CertsV1
{
public $args = [];
public function setUp()
{
}
public function perform()
{
global $register;
/**
* 1. Get new domain
* 2. Fetch all subdomains
* 3. Check if certificate already exists
* 4. Check if certificate has been changed
* 4.1. Create / Renew certificate
* 4.2. Update loadblancer
* 4.3. Update certificate (domains, change date, expiry)
*/
}
public function tearDown()
{
// ... Remove environment for this job
}
}

View file

@ -108,6 +108,21 @@ startretries=10
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes = 0
[program:v1-certs]
command=php /usr/share/nginx/html/vendor/bin/resque
autostart=true
autorestart=true
priority=10
environment=QUEUE='v1-certs',APP_INCLUDE='/usr/share/nginx/html/app/workers/certs.php',REDIS_BACKEND='%(ENV__APP_REDIS_HOST)s:%(ENV__APP_REDIS_PORT)s'
stdout_events_enabled=true
stderr_events_enabled=true
stopsignal=QUIT
startretries=10
;stdout_logfile=/dev/stdout
;stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes = 0
[program:v1-schedule]
command=php /usr/share/nginx/html/vendor/chrisboulton/php-resque-scheduler/resque-scheduler.php
autostart=true