mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
minor fix
This commit is contained in:
parent
2eae64407d
commit
44e546af39
@ -1145,7 +1145,7 @@ class ConsoleSupervisor
|
|||||||
public function checkAttachment()
|
public function checkAttachment()
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
hd("dadsada", true);
|
||||||
if (is_writable($config['attachment_store']) !== true) {
|
if (is_writable($config['attachment_store']) !== true) {
|
||||||
$this->notify(
|
$this->notify(
|
||||||
[
|
[
|
||||||
@ -1163,22 +1163,6 @@ class ConsoleSupervisor
|
|||||||
$this->cleanNotifications('NOTIF.WRITABLE.ATTACHMENT');
|
$this->cleanNotifications('NOTIF.WRITABLE.ATTACHMENT');
|
||||||
}
|
}
|
||||||
|
|
||||||
$filecount = 0;
|
|
||||||
|
|
||||||
$agentId = db_get_value('id_agente', 'tagente', 'nombre', 'pandora.internals');
|
|
||||||
if ($agentId !== false) {
|
|
||||||
$agent = new Agent($agentId);
|
|
||||||
|
|
||||||
$moduleId = $agent->searchModules(
|
|
||||||
['nombre' => 'Data_in_files'],
|
|
||||||
1
|
|
||||||
)->toArray()['id_agente_modulo'];
|
|
||||||
|
|
||||||
if ($moduleId > 0) {
|
|
||||||
$filecount = (int) modules_get_last_value($moduleId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($filecount > $config['num_files_attachment']) {
|
if ($filecount > $config['num_files_attachment']) {
|
||||||
$this->notify(
|
$this->notify(
|
||||||
[
|
[
|
||||||
@ -1292,17 +1276,28 @@ class ConsoleSupervisor
|
|||||||
$MAX_FILES_DATA_IN = 1000;
|
$MAX_FILES_DATA_IN = 1000;
|
||||||
$MAX_BADXML_FILES_DATA_IN = 150;
|
$MAX_BADXML_FILES_DATA_IN = 150;
|
||||||
|
|
||||||
$filecount = $this->countFiles(
|
$filecount = 0;
|
||||||
$remote_config_dir,
|
|
||||||
'',
|
$agentId = db_get_value('id_agente', 'tagente', 'nombre', 'pandora.internals');
|
||||||
$MAX_FILES_DATA_IN
|
if ($agentId !== false) {
|
||||||
);
|
$agent = new Agent($agentId);
|
||||||
|
|
||||||
|
$moduleId = $agent->searchModules(
|
||||||
|
['nombre' => 'Data_in_files'],
|
||||||
|
1
|
||||||
|
)->toArray()['id_agente_modulo'];
|
||||||
|
|
||||||
|
if ($moduleId > 0) {
|
||||||
|
$filecount = (int) modules_get_last_value($moduleId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
hd($filecount, true);
|
||||||
// If cannot open directory, count is '-1', skip.
|
// If cannot open directory, count is '-1', skip.
|
||||||
if ($filecount > $MAX_FILES_DATA_IN) {
|
if ($filecount > $MAX_FILES_DATA_IN) {
|
||||||
$this->notify(
|
$this->notify(
|
||||||
[
|
[
|
||||||
'type' => 'NOTIF.FILES.DATAIN',
|
'type' => 'NOTIF.FILES.DATAIN',
|
||||||
'title' => __('There are too much files in spool').'.',
|
'title' => __('There are too many files in spool').'.',
|
||||||
'message' => __(
|
'message' => __(
|
||||||
'There are more than %d files in %s. Consider checking DataServer performance',
|
'There are more than %d files in %s. Consider checking DataServer performance',
|
||||||
$MAX_FILES_DATA_IN,
|
$MAX_FILES_DATA_IN,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user