|
16 | 16 | # NON-ZIP NODES
|
17 | 17 | dot.node('START', 'START', shape='ellipse', fillcolor='black', fontcolor='white')
|
18 | 18 | dot.node('END', 'END', shape='ellipse', fillcolor='#77DD77')
|
19 |
| -dot.node('A', 'FetchFileJob [db]') |
20 |
| -dot.node('C', 'OpenDbJob', fillcolor='#ffefd5') |
| 19 | +dot.node('ABORT', 'ABORT', shape='ellipse', fillcolor='#ff8f8f') |
| 20 | +dot.node('A', 'FetchDataJob [db]') |
| 21 | +dot.node('B', 'LoadLocalStoreJob', fillcolor='#ffefd5') |
| 22 | +dot.node('C', 'OpenDbJob', fillcolor='#B0E0E6') |
21 | 23 | dot.node('D', 'ProcessDbMainJob', fillcolor='#B0E0E6')
|
22 |
| -dot.node('E', 'ProcessDbIndexJob', fillcolor='#B0E0E6') |
| 24 | +dot.node('E', 'ProcessDbIndexJob', fillcolor='#B0E0E6:#ffefd5') |
23 | 25 | dot.node('M', 'FetchFileJob [file]')
|
24 |
| -dot.node('N', 'ValidateFileJob [file]', fillcolor='#ffefd5') |
25 | 26 |
|
26 | 27 | # Example "legend" nodes
|
27 | 28 | dot.node('0', 'CPU', fillcolor='#B0E0E6')
|
28 | 29 | dot.node('1', 'File System', fillcolor='#ffefd5')
|
29 | 30 | dot.node('2', 'Network')
|
30 | 31 |
|
31 | 32 | dot.edge('START', 'A', label='1:N')
|
| 33 | +dot.edge('START', 'B') |
32 | 34 |
|
33 | 35 | dot.edge('A', 'C', weight='10')
|
34 |
| -dot.edge('C', 'D', weight='10') |
35 |
| -dot.edge('D', 'E', weight='10') |
| 36 | +dot.edge('C', 'D', weight='10', label=' db + store') |
| 37 | +dot.edge('D', 'E', weight='10', label=' if no zips') |
36 | 38 |
|
37 |
| -dot.edge('E', 'M', label='1:N') |
38 |
| -dot.edge('M', 'N') |
| 39 | +dot.edge('E', 'M', label=' 1:N') |
39 | 40 |
|
| 41 | +dot.edge('B', 'C', style='dotted', constraint='true', label='wait\nstore', dir='back') |
| 42 | + |
| 43 | +dot.edge('B', 'B', label=' retry', style='dashed', constraint='false') |
| 44 | +dot.edge('A', 'A', label=' retry', style='dashed', constraint='false') |
40 | 45 | dot.edge('C', 'A', label=' retry', style='dashed', constraint='true')
|
41 |
| -dot.edge('N', 'M', label=' retry', style='dashed', constraint='false') |
| 46 | +dot.edge('M', 'M', label=' retry', style='dashed', constraint='false') |
42 | 47 |
|
43 |
| -dot.edge('N', 'END', weight='20', constraint='true') |
| 48 | +dot.edge('M', 'END', weight='20', constraint='true') |
| 49 | +dot.edge('B', 'ABORT', weight='20', constraint='true', label=' if always fails', style='dashed') |
44 | 50 |
|
45 | 51 | dot.render('jobs_diagram', format='png', cleanup=True)
|
46 | 52 |
|
|
50 | 56 | c.node('3', 'Zip Feature', style='filled', fillcolor='#8f8fff', fontcolor='white', penwidth='0')
|
51 | 57 |
|
52 | 58 | c.node('O', 'WaitDbZipsJob', fillcolor='#B0E0E6')
|
53 |
| - c.node('F', 'ProcessZipIndexJob', fillcolor='#B0E0E6') |
54 |
| - c.node('G', 'FetchFileJob [zip summary]') |
55 |
| - c.node('H', 'ValidateFileJob [zip summary]', fillcolor='#ffefd5') |
56 |
| - c.node('I', 'OpenZipSummaryJob', fillcolor='#ffefd5') |
57 |
| - c.node('J', 'FetchFileJob [zip contents]') |
58 |
| - c.node('K', 'ValidateFileJob [zip contents]', fillcolor='#ffefd5') |
| 59 | + c.node('F', 'ProcessZipIndexJob', fillcolor='#B0E0E6:#ffefd5') |
| 60 | + c.node('G', 'FetchDataJob [zip summary]') |
| 61 | + c.node('I', 'OpenZipSummaryJob', fillcolor='#B0E0E6') |
| 62 | + c.node('DOT0', '', shape='circle', fixedsize='true', width='0.01', fillcolor='#ff8f8f') |
| 63 | + c.node('J', 'FetchDataJob [zip contents]') |
59 | 64 | c.node('L', 'OpenZipContentsJob', fillcolor='#ffefd5')
|
60 |
| - c.node('Q', '', shape='circle', fixedsize='true', width='0.01', fillcolor='#ff8f8f') |
| 65 | + c.node('DOT1', '', shape='circle', fixedsize='true', width='0.01', fillcolor='#ff8f8f') |
| 66 | + c.node('DOT2', '', shape='circle', fixedsize='true', width='0.01', fillcolor='#ff8f8f') |
61 | 67 | #
|
62 | 68 | # EDGES
|
63 | 69 | #
|
64 |
| -dot.edge('D', 'O', weight='10') |
65 |
| -dot.edge('O', 'E', weight='10') |
66 |
| -dot.edge('D', 'G', label='1:N') |
| 70 | +dot.edge('D', 'O', weight='10', label='if zips') |
| 71 | +dot.edge('O', 'E', weight='10', label='store w/ deselected\nzip indexes') |
| 72 | +dot.edge('D', 'G', label='1:N (missing zips)') |
67 | 73 |
|
68 |
| -dot.edge('F', 'J') |
| 74 | +dot.edge('F', 'J', label='if many file installs') |
69 | 75 | dot.edge('I', 'F')
|
70 |
| -dot.edge('G', 'H') |
71 |
| -dot.edge('H', 'I') |
72 |
| -dot.edge('J', 'K') |
73 |
| -dot.edge('K', 'L') |
74 |
| -dot.edge('L', 'M', label='1:N') |
75 |
| -dot.edge('F', 'Q', label='1:N', dir='none') |
76 |
| -dot.edge('Q', 'M') |
| 76 | +dot.edge('G', 'I') |
| 77 | +dot.edge('J', 'L') |
| 78 | +dot.edge('L', 'M', label='1:N\n(invalid files)') |
| 79 | +dot.edge('F', 'DOT1', dir='none') |
| 80 | +dot.edge('DOT1', 'DOT2', label='if just few\n file installs', dir='none') |
| 81 | +dot.edge('DOT2', 'M', label=' 1:N') |
77 | 82 | #dot.edge('L', 'M', label='1:N')
|
78 | 83 |
|
79 | 84 | # “Wait” edges
|
80 |
| -dot.edge('F', 'O', style='dotted', constraint='true', label='wait') |
| 85 | +dot.edge('F', 'O', style='dotted', constraint='true', label='wait\n zip indexes', dir='back') |
81 | 86 |
|
82 | 87 | # Labeled “1:N” edges
|
83 |
| -dot.edge('D', 'F', label='1:N', weight='5') |
| 88 | +dot.edge('D', 'F', label='1:N (stored zips)', weight='5') |
84 | 89 |
|
85 | 90 | # Edges to END
|
86 | 91 | dot.edge('L', 'END', weight='20', constraint='true')
|
87 | 92 |
|
88 | 93 | # “Retry” edges
|
89 |
| -dot.edge('H', 'G', label=' r', style='dashed', constraint='false') |
90 |
| -dot.edge('I', 'G', label=' r', style='dashed', constraint='false') |
91 |
| -dot.edge('K', 'J', label=' r', style='dashed', constraint='false') |
92 |
| -dot.edge('L', 'J', label=' r', style='dashed', constraint='false') |
| 94 | +dot.edge('G', 'G', label=' retry', style='dashed', constraint='false') |
| 95 | +dot.edge('I', 'G', label=' retry', style='dashed', constraint='false') |
| 96 | +dot.edge('J', 'J', label=' retry', style='dashed', constraint='false') |
| 97 | +dot.edge('L', 'J', label=' retry', style='dashed', constraint='false') |
93 | 98 |
|
94 | 99 | # "Backup" edges
|
95 |
| -dot.edge('G', 'F', label='backup if stored', style='dashed', constraint='false') |
| 100 | +dot.edge('G', 'DOT0', style='dashed', constraint='true', dir='none') |
| 101 | +dot.edge('I', 'DOT0', style='dashed', constraint='true', dir='none') |
| 102 | +dot.edge('DOT0', 'F', label='backup:\nstored summary', style='dashed', constraint='false') |
96 | 103 | #dot.edge('H', 'I', label='b', style='dashed', constraint='false', dir='none')
|
97 | 104 | #dot.edge('I', 'F', label='b', style='dashed', constraint='false')
|
98 | 105 | #dot.edge('J', 'E', label='b', style='dashed', constraint='false')
|
|
0 commit comments