Skip to content

Commit 5c3e2be

Browse files
committed
Changes from node scripts/eslint_all_files --no-cache --fix
1 parent 9c80944 commit 5c3e2be

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

  • x-pack/platform/plugins/shared/alerting/server/application/rule/methods/bulk_create

x-pack/platform/plugins/shared/alerting/server/application/rule/methods/bulk_create/bulk_create_rules.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -350,9 +350,8 @@ async function runBatch<Params extends RuleParams>({
350350
let scheduledIds: string[] = [];
351351
const survivingEnabledIds = survivingEnabled.map((p) => p.id);
352352
try {
353-
const scheduledTasks = await withSpan(
354-
{ name: 'runBatch.bulkSchedule', type: 'tasks' },
355-
() => context.taskManager.bulkSchedule(tasksToSchedule)
353+
const scheduledTasks = await withSpan({ name: 'runBatch.bulkSchedule', type: 'tasks' }, () =>
354+
context.taskManager.bulkSchedule(tasksToSchedule)
356355
);
357356
scheduledIds = scheduledTasks.map((task) => task.id);
358357
} catch (error) {
@@ -420,13 +419,11 @@ async function runBatch<Params extends RuleParams>({
420419

421420
let bulkResponse;
422421
try {
423-
bulkResponse = await withSpan(
424-
{ name: 'runBatch.bulkCreateRulesSo', type: 'rules' },
425-
() =>
426-
bulkCreateRulesSo({
427-
savedObjectsClient: context.unsecuredSavedObjectsClient,
428-
bulkCreateRuleAttributes: bulkObjects,
429-
})
422+
bulkResponse = await withSpan({ name: 'runBatch.bulkCreateRulesSo', type: 'rules' }, () =>
423+
bulkCreateRulesSo({
424+
savedObjectsClient: context.unsecuredSavedObjectsClient,
425+
bulkCreateRuleAttributes: bulkObjects,
426+
})
430427
);
431428
} catch (error) {
432429
// Whole-call SO failure: invalidate keys, best-effort task cleanup.

0 commit comments

Comments
 (0)