meumobi / AMS.Connect

1 stars 0 forks source link

If launch import w/ --update-admargin option and margin email missing then raises and error #92

Closed vdias38 closed 6 years ago

vdias38 commented 6 years ago

I've ran following command on staging: $ heroku run php artisan providers:perform rubicon --mode=console-light --update-admargin --update-adserving --update-correlationtable

Daily email of margin mas missing on amsconnect inbox

lumen.ERROR: ErrorException: count(): Parameter must be an array or an object that implements Countable in /app/app/Lib/EmailReader.php:49 Stack trace: 
#0 [internal function]: Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}(2, 'count(): Parame...', '/app/app/Lib/Em...', 49, Array) 
#1 /app/app/Lib/EmailReader.php(49): count(false) 
#2 /app/app/Services/admargin/AdmarginService.php(92): App\Lib\EmailReader->searchEmails('amsconnect+publ...', '12-Dec-2017') 
#3 /app/app/Services/admargin/AdmarginService.php(35): App\Services\admargin\AdmarginService->call('12-Dec-2017', 'amsconnect+publ...', ',') 
#4 /app/app/Jobs/DailyReportsPublishing.php(46): App\Services\admargin\AdmarginService->perform(Array)
vdias38 commented 6 years ago

imap_search used on app/Lib/EmailReader.php Return FALSE if no messages have been found. Then should test response before calling count function