mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-29 16:06:31 +08:00
fix(send): temporarily disable ensureOnce protection
Since we catch any post-send errors now in K2 and if there is a temporary error, this protection won't let you send a message again
This commit is contained in:
parent
964cb3bd86
commit
151510b823
1 changed files with 1 additions and 5 deletions
|
@ -36,10 +36,6 @@ const LINK_TRACKING_ID = NylasEnv.packages.pluginIdFor('link-tracking')
|
||||||
* listening to is currently not saved to disk. This means that
|
* listening to is currently not saved to disk. This means that
|
||||||
* SendDraftTask will never know when or if the corresponding K2
|
* SendDraftTask will never know when or if the corresponding K2
|
||||||
* SyncbackTask ever finished.
|
* SyncbackTask ever finished.
|
||||||
*
|
|
||||||
* Not knowing this it will try and send the task again, but fail due to
|
|
||||||
* the ensureOnce protection we have preventing API requests from running
|
|
||||||
* twice.
|
|
||||||
*/
|
*/
|
||||||
export default class SendDraftTask extends BaseDraftTask {
|
export default class SendDraftTask extends BaseDraftTask {
|
||||||
|
|
||||||
|
@ -131,7 +127,7 @@ export default class SendDraftTask extends BaseDraftTask {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: this.draft.toJSON(),
|
body: this.draft.toJSON(),
|
||||||
timeout: 1000 * 60 * 5, // We cannot hang up a send - won't know if it sent
|
timeout: 1000 * 60 * 5, // We cannot hang up a send - won't know if it sent
|
||||||
ensureOnce: true,
|
ensureOnce: false, // TODO We disabled ensureOnce since K2 handles the task now
|
||||||
requestId: this.draft.clientId,
|
requestId: this.draft.clientId,
|
||||||
onSyncbackRequestCreated: (syncbackRequest) => {
|
onSyncbackRequestCreated: (syncbackRequest) => {
|
||||||
this._syncbackRequestId = syncbackRequest.id
|
this._syncbackRequestId = syncbackRequest.id
|
||||||
|
|
Loading…
Add table
Reference in a new issue