Code review comment for ~sbaldassin/bileto:ust-bileto

Revision history for this message
Robert Bruce Park (robru) wrote :

Well the problem with doing it in app.js is that it then runs client side:
if two people are viewing the same ticket you'll get redundant polling of
results, and if nobody is viewing the ticket then the results never appear!
if app.js then attempts to save the result to the ticket, the audit log
will appear as if users are entering information manually, eg, the log
would show "sbalda: ust_signoff: approved" which would be quite strange. Is
this really the behavior you want?

I think really the only sensible approach is to model britney/iterate.py:
run it from cron periodically, query bileto for what tickets to submit for
testing, get results and save them to the ticket. Except for the first
phase we just want to submit requests and not poll or display results just
yet.

On Sep 21, 2016 6:59 AM, "Santiago Baldassin" <
<email address hidden>> wrote:

> Good point Robert! There's no need to poll for results when the user is
> editing the form. Instead of using an independent script to get the
> results, I'd like to suggest doing it with an ajax call in the app.js which
> will be triggered every 2 minutes. That way users will have to wait only 2
> minutes in the worst case scenario and we'll be using a non blocking
> asynchronous method. As long as we update the scope in the callback,
> angular will take care of reflecting that in the ui
> --
> https://code.launchpad.net/~sbaldassin/bileto/+git/bileto/+merge/306251
> You are reviewing the proposed merge of ~sbaldassin/bileto:ust-bileto into
> bileto:master.
>

« Back to merge proposal