Hi everybody
I’m writing a custom plugin. This plugin create an action for calling user by phone using a SaaS, this action works by calling a REST service with the contact information. At the first call the user is added to a queue, and then I need to keep requesting status until the contact is finally contacted, and then I stop requesting that status.
Technically speaking, my action will execute $event->setResult(false)
until the contact is contacted, then I call $event->setResult(true)
or $event->setFailed('some error')
depending on success or failure in contact.
My problem is that I got a lot of error notifications regarding these $event->setResult(false)
calls, how can I avoid this notifications on the Mautic interface? Is this the expected behavior? Here is an screenshot:
Also, once I call $event->setResult(true)
I expect to see the completed counter to increase but it’s still 0
I run these commands by hand to test, every time I add a new contact while I’m developing.
app/console --env=dev mautic:segments:update
app/console --env=dev mautic:campaign:update
app/console --env=dev mautic:campaign:trigger
Can it be a missing command?
I’m running version 2.16.2-6-gc1759b7a from git.
– edit –
From what I could find I have these entries on <prefix>lead_event_log
and <prefix>lead_event_failed_log
mysql> select c.firstname, a.id, a.event_id, a.lead_id, a.campaign_id, a.is_scheduled, b.date_added failed_date_added, a.date_triggered from mauticcampaign_lead_event_log a join mauticcampaign_lead_event_failed_log b on a.id = b.log_id join mauticleads c on c.id = a.lead_id;
+-----------+-----+----------+---------+-------------+--------------+---------------------+---------------------+
| firstname | id | event_id | lead_id | campaign_id | is_scheduled | failed_date_added | date_triggered |
+-----------+-----+----------+---------+-------------+--------------+---------------------+---------------------+
| Daniel | 223 | 45 | 5 | 43 | 0 | 2020-06-30 00:06:31 | 2020-06-30 00:09:11 |
| Daniel 2 | 224 | 45 | 6 | 43 | 0 | 2020-06-30 00:06:32 | 2020-06-30 00:09:11 |
| Daniel 3 | 225 | 45 | 8 | 43 | 0 | 2020-06-30 00:20:42 | 2020-06-30 00:22:10 |
| Daniel 4 | 226 | 45 | 9 | 43 | 0 | 2020-06-30 17:27:43 | 2020-06-30 17:27:50 |
+-----------+-----+----------+---------+-------------+--------------+---------------------+---------------------+
So I have some entries on lead_event_failed_log
, maybe are these tied to the failed notifications in the web interface?
I couldn’t find out what controls the pending actions counter yet