w
This commit is contained in:
parent
f8bfcd7295
commit
20db40c362
@ -160,3 +160,21 @@ BEGIN
|
|||||||
END;
|
END;
|
||||||
$$
|
$$
|
||||||
LANGUAGE plpgsql IMMUTABLE;
|
LANGUAGE plpgsql IMMUTABLE;
|
||||||
|
|
||||||
|
CREATE OR REPLACE FUNCTION FIX_ORDER_COUNTS ()
|
||||||
|
RETURNS BOOLEAN
|
||||||
|
AS $$
|
||||||
|
BEGIN
|
||||||
|
UPDATE virtual_orders SET counts = COALESCE (
|
||||||
|
(
|
||||||
|
SELECT COUNT( * )
|
||||||
|
FROM virtual_order_cards_partition
|
||||||
|
WHERE virtual_order_cards_partition."type" = virtual_orders."type"
|
||||||
|
AND virtual_order_cards_partition.order_id = virtual_orders."id"
|
||||||
|
GROUP BY "type",order_id
|
||||||
|
), 0);
|
||||||
|
|
||||||
|
RETURN TRUE;
|
||||||
|
END;
|
||||||
|
$$
|
||||||
|
LANGUAGE plpgsql;
|
||||||
|
@ -1,11 +1,25 @@
|
|||||||
[program:vd-worker]
|
[program:vd-worker-default]
|
||||||
process_name=%(program_name)s_%(process_num)02d
|
process_name=%(program_name)s_%(process_num)02d
|
||||||
command=php /www/vd/artisan queue:work --queue=default,sync --memory=4096
|
command=php /www/vd/artisan queue:work --queue=default --memory=4096 --tries=3
|
||||||
autostart=true
|
autostart=true
|
||||||
autorestart=true
|
autorestart=true
|
||||||
user=www
|
user=www
|
||||||
numprocs=2
|
numprocs=3
|
||||||
redirect_stderr=true
|
redirect_stderr=true
|
||||||
stdout_logfile = /var/log/vd-queue.log
|
stdout_logfile = /var/log/vd-queue.log
|
||||||
stderr_logfile_maxbytes=1MB
|
stderr_logfile_maxbytes=1MB
|
||||||
stdout_logfile_maxbytes=1MB
|
stdout_logfile_maxbytes=1MB
|
||||||
|
|
||||||
|
[program:vd-worker-sync]
|
||||||
|
process_name=%(program_name)s_%(process_num)02d
|
||||||
|
command=php /www/vd/artisan queue:work --queue=sync --memory=4096 --tries=3 --timeout=600
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
user=www
|
||||||
|
numprocs=3
|
||||||
|
redirect_stderr=true
|
||||||
|
stdout_logfile = /var/log/vd-queue.log
|
||||||
|
stderr_logfile_maxbytes=1MB
|
||||||
|
stdout_logfile_maxbytes=1MB
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once realpath(dirname(__FILE__) . '/TestCase.php');
|
require_once realpath(dirname(__FILE__) . '/TestCase.php');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user