refactor: Extract processor job into separate background jobs
This commit is contained in:
@@ -33,7 +33,6 @@ export default {
|
||||
async run($: IGlobalVariable) {
|
||||
return await searchTweets($, {
|
||||
searchTerm: $.step.parameters.searchTerm as string,
|
||||
lastInternalId: $.flow.lastInternalId,
|
||||
});
|
||||
},
|
||||
|
||||
|
@@ -68,7 +68,9 @@ const searchTweets = async (
|
||||
return (tweet.raw.id as number) - (nextTweet.raw.id as number);
|
||||
});
|
||||
|
||||
return tweets;
|
||||
for (const tweet of tweets.data) {
|
||||
await $.process(tweet);
|
||||
}
|
||||
};
|
||||
|
||||
export default searchTweets;
|
||||
|
Reference in New Issue
Block a user