Mark Rushakoff
47d04f198d
fix(task): align task every with whole units
...
Previously, using every=1m would run every minute from when the task was
created. This change restores the original intent, which is that "every
1m" happens on the minute, "every 1h" on the hour, etc.
2018-11-30 16:26:27 -08:00
Mark Rushakoff
dc5616e3f9
refactor(task): store meta objects by raw ID, not ID string
...
The keys used to be strings, back when platform.ID was a byte slice, not
a uint64.
And rename the field from runners to meta, which is much more accurate.
2018-11-30 08:47:17 -08:00
Mark Rushakoff
b1c80c8991
Merge pull request #1627 from zhulongcheng/task-page-size
...
fix(task): add limit field to TaskFilter
2018-11-30 08:17:12 -08:00
Edd Robinson
186e0392ed
Address PR feedback
2018-11-30 10:54:24 +00:00
Edd Robinson
9403c1ec8e
Ensure error strings not capitalised ST1005
2018-11-30 10:54:24 +00:00
zhulongcheng
535716044f
unify task page size
2018-11-30 10:02:41 +08:00
docmerlin (j. Emrys Landivar)
57fe285e56
add run return to rerun
2018-11-27 11:48:32 -06:00
Mark Rushakoff
5b3f51a7b2
test(task): ensure that deleting a task, deletes its meta
2018-11-21 14:11:37 -08:00
Mark Rushakoff
75c5d91cec
feat(task): include task status when listing tasks
2018-10-24 09:38:02 -07:00
Mark Rushakoff
8c0aec7975
fix(task): propagate status updates when modifying tasks
...
This also changes the backend.Store API to remove the EnableTask and
DisableTask methods, merging their functionality into ModifyTask, which
has been named to UpdateTask to keep closer to the CRUD acronym.
2018-10-19 16:49:18 -07:00
Mark Rushakoff
ad4942fe36
refactor(task): expose status when finding from TaskService
...
And consistently return ErrTaskNotFound, rather than nil, nil, when
searching an ID that doesn't exist.
2018-10-15 09:20:47 -07:00
Mark Rushakoff
cb0b54cfd9
feat(task): allow setting task status during creation
...
This renames TaskEnabled and TaskDisabled to TaskActive and
TaskInactive, to keep in line with the swagger and other parts of the
system. But I left the EnableTask and DisableTask methods on the Store
interface for now. I could see eliminating those methods if we adjust
the signature of the UpdateTask method.
2018-10-15 09:20:47 -07:00
Mark Rushakoff
56f32b4780
refactor(task): extract CreateTaskRequest struct
...
We're about to add another parameter, so condensing the arguments into a
single struct makes sense at this point.
2018-10-15 09:20:47 -07:00
Leonardo Di Donato
6725ae6f64
feat(platform/id): method to create an invalid id
...
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2018-10-11 09:54:18 -05:00
Leonardo Di Donato
9104771408
fix(task/backend): porting to uint64 IDs
...
Co-Authored-By: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2018-10-11 09:54:18 -05:00
Leonardo Di Donato
f5dfe0aecc
fix(task/backend): create task returns a platform.ID + inmem store
...
refactoring
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
Co-Authored-by: Lorenzo Fontana <lo@linux.com>
2018-10-11 09:54:18 -05:00
Leonardo Di Donato
8d7f06cf4b
feat(platform/id): using uint64 for platform.IDs
...
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
Co-Authored-by: Lorenzo Fontana <lo@linux.com>
2018-10-11 09:54:18 -05:00
Mark Rushakoff
35383074f3
chore(task): remove task name uniqueness requirement
2018-10-09 11:46:12 -07:00
Lyon Hill
eb260436d6
fix(task): remove race condition when finishing a inmem run ( #829 )
...
* fix(task): remove race condition when finishing a inmem run
2018-09-13 10:11:59 -06:00
Lyon Hill
8cc55b3a37
fix(task): race condition in creating and finding meta data fixed ( #828 )
2018-09-13 09:11:25 -06:00
Stuart Carnie
ac75af2f58
refactor: Migrate query package to influxdata/flux repository
2018-09-06 11:13:48 -07:00
Lyon Hill
5bcc9063d7
feat(taskd): create a FindTaskByIDWithMeta function. ( #781 )
...
Now we can retrieve both task data as well as meta in one call.
2018-09-06 11:40:32 -06:00
Mark Rushakoff
479f3dbb3d
test(task): add platform adapter tests
...
Also fix a handful of segfaults caused by improperly retained byte slices
from bolt, and combine two view transactions into one to avoid data
race when a delete happened between them.
2018-09-05 10:06:55 -07:00
Mark Rushakoff
ac03771c62
feat(task): handle manual runs in StoreTaskMeta.CreateNextRun
2018-08-26 20:34:05 -07:00
Mark Rushakoff
4573c16367
feat(task): add ManuallyRunTimeRange to Store
2018-08-26 20:34:05 -07:00
Mark Rushakoff
813ba2f221
chore(task): rename StoreTaskMeta.LastCompleted to LatestCompleted
...
LastCompleted implies they could be out of order, so LatestCompleted is
more accurate.
2018-08-22 10:36:03 -07:00
Mark Rushakoff
de577125a8
refactor(task): remove CreateRun method from Store
...
This method has been superseded by CreateNextRun.
2018-08-17 11:49:09 -07:00
Mark Rushakoff
64ad4bd1c2
refactor(task): add CreateNextRun method to Store interface
...
CreateNextRun centralizes StoreTaskMeta modification and therefore
simplifies Store functions a bit.
Store.CreateNextRun isn't called anywhere yet. The next step here is to
use CreateNextRun from the scheduler and remove Store.CreateRun.
2018-08-17 11:08:23 -07:00
Mark Rushakoff
cd9b9d65a4
refactor(task): set Delay on StoreTaskMeta
2018-08-17 11:08:23 -07:00
Mark Rushakoff
c2c4de05b0
chore(task): update StoreTaskMeta for manually requested runs
2018-08-17 11:08:23 -07:00
Mark Rushakoff
769791d366
refactor(task): add FinishRun method to StoreTaskMeta
...
This logic was repeated in multiple places, so now it can live in a
single place. This also sets a precedent going forward, for adding
methods to the StoreTaskMeta type. We'll likely be adding more methods
to support manual runs of a task.
2018-08-15 09:45:25 -07:00
Mark Rushakoff
a5371de0d0
fix(task): undo accidental type rename
2018-08-14 14:34:20 -07:00
Jade McGough
70ccb78c5d
chore(task): update run schema
2018-08-14 13:33:05 -07:00
Mark Rushakoff
0759cd28e6
feat(task): allow specifying when task scheduling should start
...
More specifically, introduce a `scheduleAfter` argument to
Store.CreateTask. The previous behavior was leaving a new task's meta
LatestComplete value set to zero, which meant that the first run of a
schedule would start from 1970. Now, it's set to time.Now unless
otherwise specified.
Updates #595 .
2018-08-13 10:47:08 -07:00
docmerlin (j. Emrys Landivar)
5b52f75f7e
task name modification and uniqueness
2018-08-10 18:24:41 -05:00
Lyon Hill
63b9adf86c
feat(task): allow tasks to be enabled and disabled.
2018-08-06 15:24:34 -06:00
Lyon Hill
80fe53f2b6
refactor(task): Move task meta into the backend
...
Task meta belongs with the rest of the task backend content.
2018-08-03 14:27:07 -06:00
Michael Desa
8c87c9d132
revert #442
2018-08-01 14:54:32 -04:00
Leonardo Di Donato
bdaee706d6
Fixing last changes obtained from master to make them use uint64 IDs
...
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2018-08-01 18:20:59 +02:00
Leonardo Di Donato
d2e764200e
Refactoring task backend usage of IDs (tasks)
2018-08-01 18:20:59 +02:00
docmerlin (j. Emrys Landivar)
d61abc0721
Delete users and orgs
2018-07-31 11:57:09 -05:00
Lyon Hill
67c47aba33
minor fixes
2018-07-31 10:23:35 -06:00
Lyon Hill
84d36e6987
feat(tasks): add get meta to the store interface.
2018-07-31 09:47:12 -06:00
Mark Rushakoff
090d337bf0
feat(task): migrate task code from enterprise
...
Co-authored-by: j. Emrys Landivar <landivar@gmail.com>
Co-authored-by: Lyon Hill <lyondhill@gmail.com>
2018-07-26 15:16:56 -07:00