I tht fcp.getGlobalRequests() list would be dynamic and changing , a hypothetical case could be an infinite loop. Moreover, a similar procedure is followed in case of remove downloads.. I used that to justify my logic. My bad. Regarding slow updates removal, I  haven’t really tried on many test cases. I have removed 7-8 completed uploads at once from the list and that seemed instantaneous

From: Steve Dougherty [mailto:notifications@github.com] 
Sent: 21 May 2013 02:56
To: freenet/fred-staging
Cc: NiteshBharadwaj
Subject: Re: [fred-staging] Remove finished uploads (#164)

 

In src/freenet/clients/http/QueueToadlet.java:

> @@ -293,6 +293,35 @@ public void handleMethodPOST(URI uri, HTTPRequest request, final ToadletContext
>                              }
>                              writePermanentRedirect(ctx, "Done", path());
>                              return;
> +                    } else if(request.isPartSet("remove_finished_uploads_request") && (request.getPartAsStringFailsafe("remove_finished_uploads_request", 128).length() > 0)) {
> +                            String identifier = "";
> +                            try {
> +                                   RequestStatus[] reqs;

What's your reasoning for having this as a variable instead of inline in the for-each?

—
Reply to this email directly or view it on GitHub <https://github.com/freenet/fred-staging/pull/164/files#r4305909> .  <https://github.com/notifications/beacon/7YkH13K_zCXAyv5xkKqsZwDqNDxnX047j6w88jOwpOX3m-F98ZqRuQz5Hw2VePzM.gif>