Skip to content

Commit

Permalink
fixed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gmmorris committed Apr 22, 2020
1 parent 90d9cd2 commit cca699e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions x-pack/plugins/task_manager/server/task_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export class TaskManager {
};

/**
* Initializes the task manager, preventing unknown further addition of middleware,
* Initializes the task manager, preventing any further addition of middleware,
* enabling the task manipulation methods, and beginning the background polling
* mechanism.
*/
Expand Down Expand Up @@ -437,7 +437,7 @@ export async function awaitTaskRunResult(
}
},
async (error: Error) => {
// reject if unknown error event takes place for the requested task
// reject if any error event takes place for the requested task
subscription.unsubscribe();
if (isTaskRunRequestEvent(taskEvent)) {
return reject(
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/task_manager/server/task_runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ export class TaskManagerRunner implements TaskRunner {
}): Date | null {
let result = null;

// Use custom retry logic, if unknown, otherwise we'll use the default logic
// Use custom retry logic, if any, otherwise we'll use the default logic
const retry: boolean | Date = this.definition.getRetry
? this.definition.getRetry(attempts, error)
: true;
Expand Down
3 changes: 1 addition & 2 deletions x-pack/plugins/task_manager/server/task_store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export class TaskStore {
/**
* Claims available tasks from the index, which are ready to be run.
* - runAt is now or past
* - is not currently claimed by unknown instance of Kibana
* - is not currently claimed by any instance of Kibana
* - has a type that is in our task definitions
*
* @param {OwnershipClaimingOpts} options
Expand Down Expand Up @@ -328,7 +328,6 @@ export class TaskStore {
// but actually returns the whole object that is passed to it, so as we know we're
// passing in the whole object, this is safe to do.
// This is far from ideal, but unless we change the SavedObjectsClient this is the best we can do
// (updatedSavedObject as unknown) as SavedObject<SerializedConcreteTaskInstance>
{ ...updatedSavedObject, attributes: defaults(updatedSavedObject.attributes, attributes) }
);
return c;
Expand Down

0 comments on commit cca699e

Please sign in to comment.