<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 20, 2017 at 1:31 PM, Jose Miguel Gallas Olmedo <span dir="ltr">&lt;<a href="mailto:jgallaso@redhat.com" target="_blank">jgallaso@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-family:arial,helvetica,sans-serif;font-size:small">Hi all,</div><div style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small">I am trying to solve some bugish behaviour that makes the status label to be &quot;Pending...&quot; permanently, even when the notifications have been sent.</div><div style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small">The label is &quot;Pending...&quot; when &quot;<b>servedVariants</b>&quot; is less than &quot;<b>totalVariants</b>&quot; -&gt; <a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/1.1.x-dev/admin-ui/app/components/app-detail/include/activity.html#L46" target="_blank">https://github.com/aerogear<wbr>/aerogear-unifiedpush-server/<wbr>blob/1.1.x-dev/admin-ui/app/<wbr>components/app-detail/include/<wbr>activity.html#L46</a></div><div style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small">Well, in the <b>metricsEndpoint.js</b>, it iterates over all variants and flag an error or increase the &quot;<b>servedVariants</b>&quot; property -&gt; <a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/1.1.x-dev/admin-ui/app/scripts/endpoints/metricsEndpoint.js#L28-L30" target="_blank">https://github.com/aerogear/ae<wbr>rogear-unifiedpush-server/blob<wbr>/1.1.x-dev/admin-ui/app/script<wbr>s/endpoints/metricsEndpoint.<wbr>js#L28-L30</a></div><div><br></div><div><div style="font-family:arial,helvetica,sans-serif;font-size:small">​I don&#39;t fully understand what&#39;s happening in this iteration and why there&#39;s no &quot;else&quot; clause. The problem is caused by this I think. During some iteration the counter is not being increased hence the <b>servedVariants</b> never equals <b>totalVariants</b> and hence (again) the label does not change.​</div><div style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small">So the current flow would be:</div><div style="font-family:arial,helvetica,sans-serif;font-size:small">1. If <b>deliveryStatus</b> is falsy, flag an error.</div><div style="font-family:arial,helvetica,sans-serif;font-size:small">2. If servedBatches = totalBatches then increase servedVariants</div><div style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small">Can both conditions pass? I think they can although this is not expected.</div></div></div></blockquote><div><br></div><div>with two conditions? </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div style="font-family:arial,helvetica,sans-serif;font-size:small">Can deliveryStatus be always truthy but the servedBatches != totalBatches? </div></div></div></blockquote><div><br></div><div>Yes, each batch uses a Sender, which signals if it could submit something to the provider:</div><div><a href="https://github.com/aerogear/aerogear-unifiedpush-server/blob/1.1.x-dev/push/sender/src/main/java/org/jboss/aerogear/unifiedpush/message/NotificationDispatcher.java#L94-L98">https://github.com/aerogear/aerogear-unifiedpush-server/blob/1.1.x-dev/push/sender/src/main/java/org/jboss/aerogear/unifiedpush/message/NotificationDispatcher.java#L94-L98</a><br></div><div><br></div><div>now, when we have 10 batches, starting in batch one we do set the status to true, and we continue to do so (if success) on all other coming batches.</div><div><br></div><div><br></div><div>On the server I noticed a timing issue, with the internal processing of the metrics payload via JMS</div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div style="font-family:arial,helvetica,sans-serif;font-size:small">I think that what&#39;s happening and as a result, it is hiding some error that the user may want to see.</div><div style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small">I also think that, in case of deliveryStatus, the iteration should stop.</div><div style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:small">WDYT?</div><br></div><div><div style="font-family:arial,helvetica,sans-serif;font-size:small">​Cheers,​</div></div><span class="gmail-m_6575162050622808227HOEnZb"><font color="#888888"><div><br></div>-- <br><div class="gmail-m_6575162050622808227m_-3897081097433623209gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><p style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-weight:bold;margin:0px;padding:0px;font-size:14px;text-transform:uppercase"><span>JOSE MIGUEL</span> <span>GALLAS OLMEDO</span></p><p style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:10px;margin:0px 0px 4px;text-transform:uppercase"><span>ASSOCIATE QE, mobile</span></p><p style="font-family:overpass,sans-serif;margin:0px;font-size:10px;color:rgb(153,153,153)"><a href="https://www.redhat.com/" style="color:rgb(0,136,206);margin:0px" target="_blank">Red Hat <span><br><br></span></a></p><p style="font-family:overpass,sans-serif;margin:0px 0px 6px;font-size:10px;color:rgb(153,153,153)"><span href="tel:+34618488633">M: <a href="http://redhatemailsignature-marketing.itos.redhat.com/" style="color:rgb(0,136,206);font-size:11px;margin:0px" target="_blank">+34618488633</a>    </span></p><table border="0" style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:medium"><tbody><tr><td width="100px"><a href="https://red.ht/sig" target="_blank"><img src="https://www.redhat.com/profiles/rh/themes/redhatdotcom/img/logo-red-hat-black.png" width="90" height="auto"></a></td></tr></tbody></table></div></div></div></div></div></div></div></div></div></div></div></div>
</font></span></div>
<br>______________________________<wbr>_________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/aerogear-dev</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail-m_6575162050622808227gmail_signature"><div dir="ltr"><div>Matthias Wessendorf <br><br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.<wbr>wordpress.com/</a><br>twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a></div></div></div>
</div></div>