Fixed select not happening inside transaction for bulk post actions
no issue This potentially caused Knex timeout connection pool errors.
This commit is contained in:
parent
eafbb2856c
commit
d4e9c23f84
@ -104,7 +104,8 @@ class PostsService {
|
||||
|
||||
const postRows = await this.models.Post.getFilteredCollectionQuery({
|
||||
filter: options.filter,
|
||||
status: 'all'
|
||||
status: 'all',
|
||||
transacting: options.transacting
|
||||
}).leftJoin('emails', 'posts.id', 'emails.post_id').select('posts.id', 'emails.id as email_id');
|
||||
const deleteIds = postRows.map(row => row.id);
|
||||
|
||||
@ -177,7 +178,8 @@ class PostsService {
|
||||
|
||||
const postRows = await this.models.Post.getFilteredCollectionQuery({
|
||||
filter: options.filter,
|
||||
status: 'all'
|
||||
status: 'all',
|
||||
transacting: options.transacting
|
||||
}).select('posts.id');
|
||||
|
||||
const editIds = postRows.map(row => row.id);
|
||||
|
Loading…
Reference in New Issue
Block a user