summaryrefslogtreecommitdiff
path: root/requirements/catalogue/req-117.md
blob: a1464e4fd43d32a3f9f5f2d141e5fe3a5323cc00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# req-117

Schist must implement the procedure, `get_current_pipes_for_bucket_on_date`, as
described below.

## get_current_pipe_for_bucket_on_date

Inputs:

- `bucket`: a bucket
- `date`: a date

1. Let `most_recent_pipes` be the list of pipes `pipe` with the most recent
   `pipe.start_date` such that `pipe.bucket_id` equals `bucket.id` and
   `pipe.start_date` is no later than `date`.
2. Return a pipe `pipe` in `most_recent_pipes` with the most recent
   `pipe.timestamp`.

Sources: req-037

Satisfied by: task-001, task-006, task-054