Removed lock functionality from vault. Will try to use flock which should be smarter

This commit is contained in:
Karl Cordes 2017-03-22 01:55:30 +11:00
parent 8946659fec
commit e72b94f2c4

View file

@ -26,17 +26,6 @@ class VaultShell extends Shell {
$email_dir = '/var/www/emails';
$vault_dir = '/var/www/vaultmsgs/new';
$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
* using the string as the keys, IDs as the value
@ -352,9 +341,6 @@ class VaultShell extends Shell {
} //end email loop
if(!unlink($lockfile)) {
die("FATAL ERROR: Unable to remove vault.lock. No further Vault instances can run!");
}
} //end main