Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More usage collection in parallel, less webhooks in parallel #1766

Merged
merged 4 commits into from Mar 30, 2018

Conversation

ssalinas
Copy link
Member

/fixes #1765

@ssalinas ssalinas added this to the 0.19.2 milestone Mar 27, 2018
@ssalinas ssalinas added hs_qa and removed hs_qa labels Mar 27, 2018
@@ -60,23 +74,30 @@ public void checkWebhooks() {
int requestUpdates = 0;
int deployUpdates = 0;

for (SingularityWebhook webhook : webhooks) {
List<CompletableFuture<Void>> webhookFutures = new ArrayList<>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this list ever written to?

@Inject
public SingularityWebhookSender(SingularityConfiguration configuration, AsyncHttpClient http, ObjectMapper objectMapper, TaskHistoryHelper taskHistoryHelper, WebhookManager webhookManager) {
this.configuration = configuration;
this.http = http;
this.webhookManager = webhookManager;
this.taskHistoryHelper = taskHistoryHelper;
this.objectMapper = objectMapper;

this.webhookSemaphore = AsyncSemaphore.newBuilder(configuration::getMaxConcurrentWebhooks).build();
this.webhookExecutorService = Executors.newCachedThreadPool(new ThreadFactoryBuilder().setNameFormat("webhooks-%d").build());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't look like this guy is used anywhere after being created.

@baconmania
Copy link
Contributor

🚢

1 similar comment
@pschoenfelder
Copy link
Contributor

🚢

@ssalinas ssalinas merged commit ba0c5f0 into master Mar 30, 2018
@ssalinas ssalinas deleted the parallelism branch March 30, 2018 12:50
@stevenschlansker
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rate limiting and parallelism limits for webhook delivery
4 participants