# Errore di nuovo tentativo in sidekiq

**URL:** <https://meta.discourse.org/t/retry-error-in-sidekiq/224706>\
**Category:** Bug\
**Created:** [19 Aprile 2022, 7:25am UTC](https://meta.discourse.org/t/retry-error-in-sidekiq/224706 "2022-04-19T07:25:10Z")\
**Posts on this page:** 1\
**Showing post:** 24

<div class="post-metadata">

**Author:** ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)\
**Post date:** [3 Giugno 2022, 10:41pm UTC](https://meta.discourse.org/t/retry-error-in-sidekiq/224706/24 "2022-06-03T22:41:59Z")

</div>

Ho creato una bozza di PR per ora che aggiunge un test fallito che replica questo problema:

> <https://github.com/discourse/discourse/pull/16992>
>
> Adding a failing test first before coming up with a good solution.
> 
> Related: 357…011eb3b4e9c5fb860a34ecbb2f5cb89e89a7a
> 
> The above commit changed
> 
> \`\`\`
> PostReplyKey.find\_or\_create\_by\_safe!
> \`\`\`
> 
> to
> 
> \`\`\`
> PostReplyKey.create\_or\_find\_by!
> \`\`\`
> 
> But I don't think it is working as a 1-1 replacement because of the
> \`Validation failed: Post has already been taken\` error we are receiving
> with this change. Also we need to make sure we don't re-introduce any
> concurrency issues.
> 
> Reported: https://meta.discourse.org/t/224706/13

Ora che sappiamo quale riga di codice sta causando il problema, speriamo di poter trovare presto una buona soluzione.

---

_[View the full topic](https://meta.discourse.org/t/retry-error-in-sidekiq/224706)._
