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

performance_notifier: add #notify_sync #518

Merged
merged 1 commit into from
Dec 11, 2019
Merged

performance_notifier: add #notify_sync #518

merged 1 commit into from
Dec 11, 2019

Conversation

kyrylo
Copy link
Contributor

@kyrylo kyrylo commented Dec 11, 2019

PerformanceNotifier#notify_sync exists for the same reasons as
NoticeNotifier#notify_sync.

In certain scenarios, such as Resque jobs, AsyncSender dies before it can send
something. Because PerformanceNotifier waits 15 seconds before sending
payload, it's guaranteed that once a Resque job finishes, it also kills
PerformanceNotifier before it can send. This is the unfortunate effect of
forking.

To cope with this, we must send synchronously.

@kyrylo kyrylo force-pushed the notify-queue-sync branch 2 times, most recently from eb50ae3 to 4274859 Compare December 11, 2019 05:42
`PerformanceNotifier#notify_sync` exists for the same reasons as
`NoticeNotifier#notify_sync`.

In certain scenarios, such as Resque jobs, `AsyncSender` dies before it can send
something. Because `PerformanceNotifier` waits 15 seconds before sending
payload, it's guaranteed that once a Resque job finishes, it also kills
`PerformanceNotifier` before it can send. This is the unfortunate effect of
forking.

To cope with this, we must send synchronously.
@kyrylo kyrylo merged commit 330bf53 into master Dec 11, 2019
@kyrylo kyrylo deleted the notify-queue-sync branch December 11, 2019 06:01
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.

1 participant