Removed lock functionality from vault. Will try to use flock which should be smarter
This commit is contained in:
parent
8946659fec
commit
e72b94f2c4
14
app/vendors/shells/vault.php
vendored
14
app/vendors/shells/vault.php
vendored
|
|
@ -26,17 +26,6 @@ class VaultShell extends Shell {
|
||||||
$email_dir = '/var/www/emails';
|
$email_dir = '/var/www/emails';
|
||||||
$vault_dir = '/var/www/vaultmsgs/new';
|
$vault_dir = '/var/www/vaultmsgs/new';
|
||||||
$processed_dir = '/var/www/vaultmsgs/cur';
|
$processed_dir = '/var/www/vaultmsgs/cur';
|
||||||
$lockfile = '/var/www/CMC-Sales/app/vault.lock';
|
|
||||||
|
|
||||||
if(file_exists($lockfile)) {
|
|
||||||
die("Error: Another process is currently running. Terminating this one");
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!touch($lockfile)) {
|
|
||||||
die("FATAL ERROR: Unable to create vault.lock");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Find the strings we want to look for in the subjects. Build arrays
|
/* Find the strings we want to look for in the subjects. Build arrays
|
||||||
* using the string as the keys, IDs as the value
|
* using the string as the keys, IDs as the value
|
||||||
|
|
@ -352,9 +341,6 @@ class VaultShell extends Shell {
|
||||||
|
|
||||||
} //end email loop
|
} //end email loop
|
||||||
|
|
||||||
if(!unlink($lockfile)) {
|
|
||||||
die("FATAL ERROR: Unable to remove vault.lock. No further Vault instances can run!");
|
|
||||||
}
|
|
||||||
|
|
||||||
} //end main
|
} //end main
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue