Don't refresh after SO updates
This commit is contained in:
parent
9b6bb25b1f
commit
54f848dc0c
|
@ -462,7 +462,7 @@ export class ActionsClient {
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
return await this.unsecuredSavedObjectsClient.delete('action', id);
|
return await this.unsecuredSavedObjectsClient.delete('action', id, { refresh: false });
|
||||||
}
|
}
|
||||||
|
|
||||||
public async execute({
|
public async execute({
|
||||||
|
|
|
@ -63,7 +63,10 @@ export function createExecutionEnqueuerFunction({
|
||||||
params,
|
params,
|
||||||
apiKey,
|
apiKey,
|
||||||
},
|
},
|
||||||
executionSourceAsSavedObjectReferences(source)
|
{
|
||||||
|
...executionSourceAsSavedObjectReferences(source),
|
||||||
|
refresh: false,
|
||||||
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
await taskManager.schedule({
|
await taskManager.schedule({
|
||||||
|
|
|
@ -142,10 +142,9 @@ export class TaskRunnerFactory {
|
||||||
// We would idealy secure every operation but in order to support clean up of legacy alerts
|
// We would idealy secure every operation but in order to support clean up of legacy alerts
|
||||||
// we allow this operation in an unsecured manner
|
// we allow this operation in an unsecured manner
|
||||||
// Once support for legacy alert RBAC is dropped, this can be secured
|
// Once support for legacy alert RBAC is dropped, this can be secured
|
||||||
await getUnsecuredSavedObjectsClient(fakeRequest).delete(
|
await getUnsecuredSavedObjectsClient(
|
||||||
ACTION_TASK_PARAMS_SAVED_OBJECT_TYPE,
|
fakeRequest
|
||||||
actionTaskParamsId
|
).delete(ACTION_TASK_PARAMS_SAVED_OBJECT_TYPE, actionTaskParamsId, { refresh: false });
|
||||||
);
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// Log error only, we shouldn't fail the task because of an error here (if ever there's retry logic)
|
// Log error only, we shouldn't fail the task because of an error here (if ever there's retry logic)
|
||||||
logger.error(
|
logger.error(
|
||||||
|
|
|
@ -258,7 +258,7 @@ export class TaskStore {
|
||||||
*/
|
*/
|
||||||
public async remove(id: string): Promise<void> {
|
public async remove(id: string): Promise<void> {
|
||||||
try {
|
try {
|
||||||
await this.savedObjectsRepository.delete('task', id);
|
await this.savedObjectsRepository.delete('task', id, { refresh: false });
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.errors$.next(e);
|
this.errors$.next(e);
|
||||||
throw e;
|
throw e;
|
||||||
|
|
Loading…
Reference in a new issue