Skip to content

Commit

Permalink
try some things
Browse files Browse the repository at this point in the history
  • Loading branch information
cubeghost committed Feb 19, 2024
1 parent 6e915e5 commit 259c541
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions src/server/tumblr.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ class TumblrClient {
tag: tag,
limit: POST_LIMIT,
filter: 'text',
npf: true,
}, params)).then(response => {

let posts;
Expand Down Expand Up @@ -307,17 +308,30 @@ class TumblrClient {
replace,
});

return Sentry.startSpan({
name: 'editLegacyPost',
attributes: {
blog: this.blog,
return new Promise((resolve, reject) => {
return Sentry.startSpan({
name: 'editLegacyPost',
op: 'http',
attributes: {
blog: this.blog,
id: post.id_string,
tags: replacedTags.join(',')
}
}, (span) => this.client.editLegacyPost(this.blog, {
id: post.id_string,
tags: replacedTags.join(',')
}
}, async () => await this.client.editLegacyPost(this.blog, {
id: post.id_string,
tags: replacedTags.join(',')
}));
}, (err, resp, response) => {
if (err) {
console.log(response);
if (span) {
span.setAttribute('response', response);
}
reject(err);
} else {
resolve(resp);
}
}));
});
})
.value();

Expand Down

0 comments on commit 259c541

Please sign in to comment.