Documentation ¶
Overview ¶
Package task provides the tracking of state for a single task pushed by the external task queue.
The Task type ... TODO(dev) Improve comments and header before merging to dev.
Index ¶
Constants ¶
const DefaultMaxFileSize = 200 * 1024 * 1024
DefaultMaxFileSize is the default value for the file size limit for calls to NextTest. Larger than this risks an OOM if there are multiple large files at on multiple tasks. This can be overridden with SetMaxFileSize()
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
Factory provides Get() which always returns a new, complete Task. TODO for the defs that stay in factory package, remove ...Factory.
type Task ¶
type Task struct { // TestSource and Parser are both embedded, so their interfaces are delegated // to the component structs. etl.TestSource // Source from which to read tests. etl.Parser // Parser to parse the tests. // contains filtered or unexported fields }
Task contains the state required to process a single task tar file. TODO(dev) Add unit tests for meta data.
func (*Task) ProcessAllTests ¶
ProcessAllTests loops through all the tests in a tar file, calls the injected parser to parse them, and inserts them into bigquery. Returns the number of files processed. TODO pass in the datatype label.
func (*Task) SetMaxFileSize ¶
SetMaxFileSize overrides the default maxFileSize.