Commit Graph

14 Commits (838b3ea1b941a82d0a0a0e0fb3d8222f416e1c02)

Author SHA1 Message Date
Johnny Steenbergen 35bc18bc34 fix(task): update task max page size error message to include an accurate limit
previously it had returned and error of 100, but the limit was 500.
2020-08-06 11:09:40 -07:00
Alirie Gray 6c6bd39ffc
refactor(tasks): remove dead scheduler code (#16252) 2020-01-02 11:41:21 -08:00
Lyon Hill 3c6779f011
feat(task): Allow tasks to run more isolated from other task systems (#15384)
* feat(task): Allow tasks to run more isolated from other task systems

To allow the task internal system to be used for user created tasks as well
as checks, notification and other future additions we needed to take 2 actions:

1 - We need to use type as a first class citizen, meaning that task's have a type
and each system that will be creating tasks will set the task type through the api.
This is a change to the previous assumption that any user could set task types. This change
will allow us to have other service's white label the task service for their own purposes and not
have to worry about colissions between the types.

2 - We needed to allow other systems to add data specific to the problem they are trying to solve.
For this purpose adding a `metadata` field to the internal task system which should allow other systems to
use the task service.

These changes will allow us in the future to allow for the current check's and notifications implementations
to create a task with meta data instead of creating a check object and a task object in the database.
By allowing this new behavior checks, notifications, and user task's can all follow the same pattern:

Field an api request in a system specific http endpoint, use a small translation to the `TaskService` function call,
translate the results to what the api expects for this system, and return results.

* fix(task): undo additional check for ownerID because check is not ready
2019-10-11 08:53:38 -06:00
Alirie Gray 364e80bc94
fix(tasks): use go errors for scheduler metrics (#15374) 2019-10-10 09:55:30 -07:00
Alirie Gray be28de8fbc
feat(tasks): deactivate task on unrecoverable error (#15369) 2019-10-09 13:51:03 -07:00
Alirie Gray a9df93b1fd
refactor(tasks): create coordinator for new scheduler/executor (#15268) 2019-09-26 13:55:23 -07:00
Lyon Hill 7aa98ca84f
feat(task): add limit function for task concurrency (#15266)
* feat(task): add limit function for task concurrency

The new task executor handles limit's differently then the old executor
instead of front loading limits by creating a runner for every task that might run
the new executor has a large worker pool and queue. This allow's us to have a unlimited
concurrency per task and helps us avoid a back log of task's execution based on a
arbitrary execution limit. This add's the ability to add an optional task execution limit
so a user can still have the advantages of limiting concurrency.
2019-09-25 12:02:04 -06:00
Alirie Gray aef199bcc1
fix(tasks): use influxdb errors in scheduler (#15145) 2019-09-16 13:55:39 -07:00
Alirie Gray 645df57102
feat(tasks): use influxdb errors for executor metrics (#14926) 2019-09-10 12:48:55 -07:00
Lyon Hill 0b247cce5b
feat(task): Remove token's from task structures (#14712)
* feat(task): Remove token's from task structures

We had previously removed token's from the task api but left the token in place in several locations in the stack.
Now we can cleanly remove the extra tokens.
2019-08-20 08:42:40 -06:00
Lyon Hill e922c8a26f
feat(task): add task types (#14567) 2019-08-06 10:27:52 -06:00
Alirie Gray c04f3a2b30 chore(tasks): remove old auth code and allow only token auth 2019-07-26 09:51:32 -07:00
Alirie Gray c7f09d6a56
chore(tasks): use pointers for task errors (#14343) 2019-07-15 13:57:51 -07:00
Alirie Gray 66157c9d44 chore(tasks): consolidate task errors into task_errors.go 2019-06-17 16:03:18 -07:00