@Override
    public void run() {
        List<User> orgs;
        try {
            orgs = cache.requestAndStore(persistedOrgs);
            syncResult.stats.numUpdates++;
        } catch (SQLException e) {
            syncResult.stats.numIoExceptions++;
            Log.d(TAG, "Exception requesting users and orgs", e);
            return;
        }

        Log.d(TAG, "Syncing " + orgs.size() + " users and orgs");
        for (User org : orgs) {
            if (cancelled) {
                return;
            }

            Log.d(TAG, "Syncing repos for " + org.login());
            try {
                cache.requestAndStore(repos.create(org));
                syncResult.stats.numUpdates++;
            } catch (SQLException e) {
                syncResult.stats.numIoExceptions++;
                Log.d(TAG, "Exception requesting repositories", e);
            }
        }

        Log.d(TAG, "Sync campaign finished");
    }
Create campaign for result

@param syncResult
app/src/main/java/com/github/pockethub/android/sync/SyncCampaign.java