Commit e643dd2
authored
Handle multiple crowdtangle dashboards in same pipeline, fetch and process in parallel (#200)
* get map of dashboard name -> id before pipeline start. attached dashboard id to encapsulated post instead of doing dashboard name -> id lookup in insert_post_dashboards
* fix crowdtangle db_functions import
* log Dashboard Names -> IDs
* write_crowdtangle_results_to_database.py from master
* post merge cleanup
* Handle multiple dashboards in FetchCrowdTangle PTransform, to config multiple dashboards add config var DASHBOARD_CONFIG_SECTION_NAMES which should be a comma separated list of config sections to read dashboard config data from
* var referene and other lint cleanups
* bump minet dep version due to second-level dep issue (quenouille)
* fix minet version
* minet now returns objects as casanova.namedrecord, so convert it to dict before adding annotation.
* Lots of changes to handle new post datastructure format from minet v0.52.8 CrowdTangleAPIClient
* fix keyword arg for ExpandedLinkRecord
* add necessary PostRecord namedtuple arg
* fix make_statistics_record keyword arg
* fix arg reference in make_statistics_record
* import itertools
* add default False for account_verified
* check media and links values instead of just key presence
* log ProcessCrowdTanglePosts.process input args for debugging
* move crowdtangle fetch out of PTransform into own DoFn
* move crowdtangle fetch out of PTransform into own DoFn
* see if parallelism works with FlatMap
* undo accidental uncapitalization of code block
* remove unneeded code
* remove more unneeded code
* move date parsing out of dashboard parsing loop, move max_results_to_fetch to be dashboard_specific, simplify ref to config_section with new var instead of lookup each time
* more cleanup
* go back to version of minet currently in use in prod, and undo changes to post datastruct processing
* undo unrelated changes in write_crowdtangle_results_to_database1 parent 7cbcb75 commit e643dd2
File tree
4 files changed
+73
-56
lines changed- crowdtangle
4 files changed
+73
-56
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | | - | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | | - | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | 18 | | |
| 19 | + | |
38 | 20 | | |
39 | 21 | | |
40 | 22 | | |
| |||
59 | 41 | | |
60 | 42 | | |
61 | 43 | | |
62 | | - | |
| 44 | + | |
63 | 45 | | |
64 | 46 | | |
65 | 47 | | |
| |||
82 | 64 | | |
83 | 65 | | |
84 | 66 | | |
85 | | - | |
| 67 | + | |
86 | 68 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| 6 | + | |
| 7 | + | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
12 | | - | |
13 | | - | |
14 | 16 | | |
15 | 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 | + | |
16 | 62 | | |
17 | 63 | | |
18 | 64 | | |
| |||
29 | 75 | | |
30 | 76 | | |
31 | 77 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | 78 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 79 | + | |
59 | 80 | | |
60 | | - | |
| 81 | + | |
61 | 82 | | |
62 | 83 | | |
63 | | - | |
64 | | - | |
| 84 | + | |
| 85 | + | |
65 | 86 | | |
66 | 87 | | |
67 | 88 | | |
| |||
0 commit comments