We should remove the NSCondition in KIOUploader and instead remove events from the pending event queue in the db while they are in flight. That might be moving them to another table, or just storing them in memory along with the request state. Then upon failure, failing events can be marked as pending again if they haven't already retried too many times.