fix: [speculative fix] for event publishing timing issues

pull/8530/head
iglocska 2022-08-05 14:41:00 +02:00
parent c05ac67a7b
commit 77eaa86225
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 6 additions and 1 deletions

View File

@ -4279,7 +4279,6 @@ class Event extends AppModel
$jobId
);
}
return $this->publish($id, $passAlong);
}
@ -4324,6 +4323,7 @@ class Event extends AppModel
'recursive' => -1,
'conditions' => array('Event.id' => $id)
));
if (empty($event)) {
return false;
}
@ -4339,6 +4339,10 @@ class Event extends AppModel
'order' => ['id ASC']
]);
}
$fieldList = array('published', 'id', 'info', 'publish_timestamp');
$event['Event']['skip_zmq'] = 1;
$event['Event']['skip_kafka'] = 1;
$this->save($event, array('fieldList' => $fieldList));
$userForPubSub = [
'id' => 0,
'org_id' => $hostOrg['Org']['id'],
@ -4372,6 +4376,7 @@ class Event extends AppModel
$success = $this->executeTrigger('event-publish', $fullEvent[0], $workflowErrors, $logging);
if (empty($success)) {
$errorMessage = implode(', ', $workflowErrors);
return $errorMessage;
}
}