-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Campaign Trigger aommand and Contact export command made interruptible via the signals #14745
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
Conversation
Maut-10809 : Make long running job resumable - campaign.kickoff_campaign
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.
MAUT-10807 : Make long running job resumable - lead.contact_export
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 7.x #14745 +/- ##
============================================
+ Coverage 65.70% 65.71% +0.01%
- Complexity 34966 34978 +12
============================================
Files 2300 2302 +2
Lines 140658 140693 +35
============================================
+ Hits 92420 92462 +42
+ Misses 48238 48231 -7
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please set the target branch to 7.x
as this PR is an enhancement.
7a9c6b8
to
38b9ad8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dadarya0! Please see my suggestion.
app/bundles/LeadBundle/Command/ContactScheduledExportCommand.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dadarya0! Good job 👍
Code changes look good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dadarya0!
This PR cannot be directly tested as specified by @escopecz here: #14632 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aarohiprasad Saurabh added the implementation of the Sigterm signal to the commands so now it can be tested. @dadarya0 can you please update the steps to test?
app/bundles/LeadBundle/Command/ContactScheduledExportCommand.php
Outdated
Show resolved
Hide resolved
@aarohiprasad follow testing steps from #12845 |
@dadarya0 this has not been implemented for |
@aarohiprasad I have verified that all changes are pushed which code you did not see here ? |
Sorry, this is my fault. I had the other branch with the same name checked out. I verified again.
For
The PR is working as expected and can be merged. Thanks @dadarya0! |
@nileshlohar there are some conflicts. Please take a look |
Description
An exception for when signal is caught.
This improves the commands handling when a SIGTERM signal is sent. This happens when for example you run a command manually, it takes a while and you kill it with ^c. We don't want to kill the commands immediately but we want them to finish gracefully. In other words, we don't want to end up in some inconsistent state. We want the work for 1 batch to be finished and end the command there.
This is also useful when you have some autoscaling mechanism with your workers. When the workers scale down you want to kill the processes in progress ASAP so you save some resources. But you also don't want to cause problems and you want the killed processes to resume work in other workers. This is what this PR is about.
📋 Steps to test this PR: