mirror of https://github.com/itflow-org/itflow
Also Added logging to cron mail queue and mail parser when attempting to execute when its already executing by checking to see if the lock file is present
This commit is contained in:
parent
c30e0f7768
commit
f9d3d3b2f9
|
|
@ -20,6 +20,7 @@ if (file_exists($lock_file_path)) {
|
|||
unlink($lock_file_path);
|
||||
mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Cron-Mail-Queue', log_action = 'Delete', log_description = 'Cron Mail Queuer detected a lock file was present but was over 10 minutes old so it removed it.'");
|
||||
} else {
|
||||
mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Cron-Mail-Queue', log_action = 'Locked', log_description = 'Cron Mail Queuer attempted to execute but was already executing so instead it terminated.");
|
||||
exit("Script is already running. Exiting.");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ if (file_exists($lock_file_path)) {
|
|||
unlink($lock_file_path);
|
||||
mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Cron-Email-Parser', log_action = 'Delete', log_description = 'Cron Email Parser detected a lock file was present but was over 10 minutes old so it removed it'");
|
||||
} else {
|
||||
mysqli_query($mysqli, "INSERT INTO logs SET log_type = 'Cron-Email-Parser', log_action = 'Locked', log_description = 'Cron Email Parser attempted to execute but was already executing, so instead it terminated.");
|
||||
exit("Script is already running. Exiting.");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue