Hotfix feat: new function to kill connections
This commit is contained in:
parent
7b7afb05c5
commit
21a1e1eed3
|
@ -0,0 +1,11 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`connection_kill`(vConnectionId BIGINT)
|
||||
BEGIN
|
||||
/**
|
||||
* Kill a connection
|
||||
*
|
||||
* @param vConnectionId
|
||||
*/
|
||||
KILL vConnectionId;
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -30,10 +30,7 @@ BEGIN
|
|||
-- Si hay colecciones sin terminar, sale del proceso
|
||||
CALL collection_get(vUserFk);
|
||||
|
||||
SELECT (pc.maxNotReadyCollections - COUNT(*)) <= 0,
|
||||
pc.collectionAssignLockname
|
||||
INTO vHasTooMuchCollections,
|
||||
vLockName
|
||||
SELECT (pc.maxNotReadyCollections - COUNT(*)) <= 0 INTO vHasTooMuchCollections
|
||||
FROM productionConfig pc
|
||||
LEFT JOIN tCollection ON TRUE;
|
||||
|
||||
|
@ -49,7 +46,7 @@ BEGIN
|
|||
WHERE workerFk = vUserFk;
|
||||
|
||||
SET vLockName = CONCAT_WS('/',
|
||||
vLockName,
|
||||
'collection_assign',
|
||||
vWarehouseFk,
|
||||
vItemPackingTypeFk
|
||||
);
|
||||
|
|
|
@ -63,8 +63,7 @@ BEGIN
|
|||
o.numberOfWagons,
|
||||
o.trainFk,
|
||||
o.linesLimit,
|
||||
o.volumeLimit,
|
||||
pc.collectionNewLockname
|
||||
o.volumeLimit
|
||||
INTO vMaxTickets,
|
||||
vHasUniqueCollectionTime,
|
||||
vWorkerCode,
|
||||
|
@ -74,15 +73,14 @@ BEGIN
|
|||
vWagons,
|
||||
vTrainFk,
|
||||
vLinesLimit,
|
||||
vVolumeLimit,
|
||||
vLockName
|
||||
vVolumeLimit
|
||||
FROM productionConfig pc
|
||||
JOIN worker w ON w.id = vUserFk
|
||||
JOIN state st ON st.`code` = 'ON_PREPARATION'
|
||||
JOIN operator o ON o.workerFk = vUserFk;
|
||||
|
||||
SET vLockName = CONCAT_WS('/',
|
||||
vLockName,
|
||||
'collection_new',
|
||||
vWarehouseFk,
|
||||
vItemPackingTypeFk
|
||||
);
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
ALTER TABLE vn.productionConfig
|
||||
DROP COLUMN IF EXISTS collectionNewLockname,
|
||||
DROP COLUMN IF EXISTS collectionAssignLockname;
|
Loading…
Reference in New Issue