small changes all over the place
This commit is contained in:
parent
f2c0d55916
commit
8551763f77
4 changed files with 4 additions and 6 deletions
|
@ -131,9 +131,6 @@ namespace BirdsiteLive.Domain
|
|||
_logger.LogInformation("Sent tweet to " + targetHost);
|
||||
_logger.LogInformation("Tweet content is " + json);
|
||||
|
||||
var c = await response.Content.ReadAsStringAsync();
|
||||
_logger.LogInformation("Got res after posting tweet " + c);
|
||||
|
||||
return response.StatusCode;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ namespace BirdsiteLive.Pipeline.Processors
|
|||
await _twitterUserDal.UpdateTwitterUserAsync(user.Id, user.LastTweetPostedId, user.LastTweetSynchronizedForAllFollowersId, user.FetchingErrorCount, now);
|
||||
}
|
||||
|
||||
await Task.Delay(350);
|
||||
await Task.Delay(150);
|
||||
}
|
||||
|
||||
return usersWtTweets.ToArray();
|
||||
|
|
|
@ -49,9 +49,9 @@ namespace BirdsiteLive.Pipeline
|
|||
var retrieveTweetsBlock = new TransformBlock<UserWithDataToSync[], UserWithDataToSync[]>(async x => await _retrieveTweetsProcessor.ProcessAsync(x, ct));
|
||||
var retrieveTweetsBufferBlock = new BufferBlock<UserWithDataToSync[]>(new DataflowBlockOptions { BoundedCapacity = 2, CancellationToken = ct });
|
||||
var retrieveFollowersBlock = new TransformManyBlock<UserWithDataToSync[], UserWithDataToSync>(async x => await _retrieveFollowersProcessor.ProcessAsync(x, ct));
|
||||
var retrieveFollowersBufferBlock = new BufferBlock<UserWithDataToSync>(new DataflowBlockOptions { BoundedCapacity = 20, CancellationToken = ct });
|
||||
var retrieveFollowersBufferBlock = new BufferBlock<UserWithDataToSync>(new DataflowBlockOptions { BoundedCapacity = 10, CancellationToken = ct });
|
||||
var sendTweetsToFollowersBlock = new TransformBlock<UserWithDataToSync, UserWithDataToSync>(async x => await _sendTweetsToFollowersProcessor.ProcessAsync(x, ct), new ExecutionDataflowBlockOptions { MaxDegreeOfParallelism = 5, CancellationToken = ct });
|
||||
var sendTweetsToFollowersBufferBlock = new BufferBlock<UserWithDataToSync>(new DataflowBlockOptions { BoundedCapacity = 20, CancellationToken = ct });
|
||||
var sendTweetsToFollowersBufferBlock = new BufferBlock<UserWithDataToSync>(new DataflowBlockOptions { BoundedCapacity = 10, CancellationToken = ct });
|
||||
var saveProgressionBlock = new ActionBlock<UserWithDataToSync>(async x => await _saveProgressionProcessor.ProcessAsync(x, ct), new ExecutionDataflowBlockOptions { MaxDegreeOfParallelism = 5, CancellationToken = ct });
|
||||
|
||||
// Link pipeline
|
||||
|
|
|
@ -127,6 +127,7 @@ namespace BirdsiteLive.DAL.Postgres.DataAccessLayers
|
|||
PostingErrorCount = reader["postingErrorCount"] as int? ?? default,
|
||||
});
|
||||
}
|
||||
await connection.CloseAsync();
|
||||
|
||||
return followers.ToArray();
|
||||
}
|
||||
|
|
Reference in a new issue