Return-Path: X-Original-To: apmail-streams-dev-archive@minotaur.apache.org Delivered-To: apmail-streams-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F30DE118DA for ; Tue, 6 May 2014 07:03:34 +0000 (UTC) Received: (qmail 91405 invoked by uid 500); 6 May 2014 07:03:34 -0000 Delivered-To: apmail-streams-dev-archive@streams.apache.org Received: (qmail 91386 invoked by uid 500); 6 May 2014 07:03:33 -0000 Mailing-List: contact dev-help@streams.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@streams.incubator.apache.org Delivered-To: mailing list dev@streams.incubator.apache.org Delivered-To: moderator for dev@streams.incubator.apache.org Received: (qmail 45930 invoked by uid 99); 5 May 2014 22:24:37 -0000 X-ASF-Spam-Status: No, hits=-2000.7 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org From: mfranklin To: dev@streams.incubator.apache.org Reply-To: dev@streams.incubator.apache.org References: In-Reply-To: Subject: [GitHub] incubator-streams pull request: Twitter Modificaitons Content-Type: text/plain Message-Id: <20140505222416.77839920257@tyr.zones.apache.org> Date: Mon, 5 May 2014 22:24:16 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org Github user mfranklin commented on a diff in the pull request: https://github.com/apache/incubator-streams/pull/8#discussion_r12303181 --- Diff: streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/provider/TwitterTimelineProvider.java --- @@ -143,20 +110,12 @@ private void captureTimeline(long currentId) { { statuses = client.getUserTimeline(currentId, paging); - for (Status tStat : statuses) - { -// if( provider.start != null && -// provider.start.isAfter(new DateTime(tStat.getCreatedAt()))) -// { -// // they hit the last date we wanted to collect -// // we can now exit early -// KeepGoing = false; -// } - // emit the record - String json = DataObjectFactory.getRawJSON(tStat); - - providerQueue.offer(new StreamsDatum(json)); + for (Status tStat : statuses) { + String json = TwitterObjectFactory.getRawJSON(tStat); + while(!providerQueue.offer(new StreamsDatum(json))) { --- End diff -- There is a utility I found the other day that wraps this in a convenience method: org.apache.streams.util.ComponentUtils.offerUntilSuccess --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---