[🐴] Don't retry sends (#4111)

* Don't retry sends

* Don't retry batch sends
zio/stable
Eric Bailey 2024-05-20 09:56:57 -05:00 committed by GitHub
parent 52beb29a0d
commit 2414559b80
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 16 additions and 21 deletions

View File

@ -793,15 +793,13 @@ export class Convo {
const {id, message} = pendingMessage const {id, message} = pendingMessage
const response = await networkRetry(2, () => { const response = await this.agent.api.chat.bsky.convo.sendMessage(
return this.agent.api.chat.bsky.convo.sendMessage(
{ {
convoId: this.convoId, convoId: this.convoId,
message, message,
}, },
{encoding: 'application/json', headers: DM_SERVICE_HEADERS}, {encoding: 'application/json', headers: DM_SERVICE_HEADERS},
) )
})
const res = response.data const res = response.data
// remove from queue // remove from queue
@ -883,9 +881,7 @@ export class Convo {
) )
try { try {
// throw new Error('UNCOMMENT TO TEST RETRY') const {data} = await this.agent.api.chat.bsky.convo.sendMessageBatch(
const {data} = await networkRetry(2, () => {
return this.agent.api.chat.bsky.convo.sendMessageBatch(
{ {
items: messageArray.map(({message}) => ({ items: messageArray.map(({message}) => ({
convoId: this.convoId, convoId: this.convoId,
@ -894,7 +890,6 @@ export class Convo {
}, },
{encoding: 'application/json', headers: DM_SERVICE_HEADERS}, {encoding: 'application/json', headers: DM_SERVICE_HEADERS},
) )
})
const {items} = data const {items} = data
/* /*