-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathtask.proto
77 lines (56 loc) · 2.5 KB
/
task.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
syntax = "proto3";
package mediforproto;
import "medifor/v1/analytic.proto"; // -I gitlab.mediforprogram.com/medifor/medifor-proto/proto
import "medifor/v1/fusion.proto"; // -I gitlab.mediforprogram.com/medifor/medifor-proto/proto
// DetectionTask contains a Detection (partial - holding only the
// request) and enough surrounding machinery to allow workflow tasks to
// maintain state in a larger system.
// Next Tag: 10
message DetectionTask {
// An identifier that uniquely represents this particular detection task.
string id = 1;
// Analytics to run this detection on. When a single analytic receives a task
// like this, there will only be one value in this field. When pushing a
// completed task, this ID should be preserved so that proper attribution
// occurs.
repeated string analytic_id = 2;
// Fusers to run when all analytics are finished for this detection.
// Can be empty, in which case no fusion will be triggered on completion.
repeated string fuser_id = 9;
// A partial detection, containing an incomplete request (can be missing the
// request ID, for example) with just enough information in it to pass it on
// to an analytic.
mediforproto.Detection detection = 3;
// The queue into which a response should be inserted when this task is
// either finished or has encountered a permanent error.
string done_queue = 4;
// System tags for grouping things. Use user_tags if you aren't sure which
// one to use.
map<string, string> tags = 5;
// User tags.
map<string, string> user_tags = 7;
// Metadata table.
map<string, string> meta = 8;
// Timeout in seconds after which an analytic worker will die waiting for the
// analytic to respond. Default is "no timeout" (0 seconds).
int64 analytic_timeout_sec = 6;
}
// Next ID: 8
message FusionTask {
// Unique identifier for the fusion task
string unused_id = 1;
// Fusion algorithms to run this fusion on.
repeated string fuser_id = 2;
// A partial fusion (request filled out, requestID may be missing)
mediforproto.Fusion fusion = 3;
// The queue into which a response is inserted when this task has completed or
// encountered a permanent error
string done_queue = 4;
// Tag map
map<string, string> tags = 5;
// Timeout in seconds after which an analytic worker will die waiting for the
// analytic to respond. Default is "no timeout" (0 seconds).
int64 analytic_timeout_sec = 6;
// detection_id for the detections to be fused. Required for database writes
string detection_id = 7;
}