Added sleep to Vault while loop

This commit is contained in:
Karl Cordes 2011-03-21 14:43:56 +11:00
parent e370e1f54e
commit c49a92ecc6

View file

@ -27,7 +27,7 @@ class VaultShell extends Shell {
/******************************************************
* Config Variables
* *****************************************************/
$testing = 0; //Whether to actually move the emails. 1=test, 0=production
$testing = 1; //Whether to actually move the emails. 1=test, 0=production
if($testing == 1) {
@ -50,6 +50,12 @@ class VaultShell extends Shell {
$processed = scandir($processed_dir);
$new = array_diff($emails, $processed);
if(count($new) == 0) {
echo "\rWaiting for new messages";
sleep(60);
continue;
}
/* Find the strings we want to look for in the subjects. Build arrays