-
-
Notifications
You must be signed in to change notification settings - Fork 311
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
[14.0][IMP] edi_oca: Do not retry exchange_send indefinitely #980
base: 14.0
Are you sure you want to change the base?
Conversation
job.perform() | ||
with freeze_time("2024-01-11 08:50:00"): | ||
# + 23 hours and 50 minutes | ||
job = self.backend.with_delay().exchange_send(record) |
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.
Why not using the same job you've got before?
However, if the identity_key works well, here you should get still the same job but I think is useless to call send again.
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.
@SilvioC2C ping
job = self.backend.with_delay().exchange_send(record) | ||
res = job.perform() | ||
self.assertIn("Error", res) | ||
job_counter.search_created() |
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.
this search seems useless as you don't use the result
raise RetryableJobError( | ||
error, **exchange_record._job_retry_params() | ||
) from err | ||
if self._send_should_retry(exchange_record): |
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.
Thinking out loud...
In theory a case where we spawn another job for the same record should not exist thanks to the identity_key
.
Hence, I assume that jobs won't be retried infinitely if we reach the max retry job count.
If this does not happen it means the identity_key is not working and we end up w/ more than one job to send the same record.
Am I wrong?
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
Sometimes the backend is badly configured, with invalid URL. Or there might be other conditions.
It happens more frequently on Dev or Test server instances.
In such case we don't want to insist sending Exchange Record indefinitely.
Supersedes #960