Skip to content

Commit bb572df

Browse files
committed
Removed option to supply multiple pages
1 parent 01881ca commit bb572df

File tree

2 files changed

+28
-18
lines changed

2 files changed

+28
-18
lines changed

cloudflare-worker.js

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ sci:
5050
R_d: Website load
5151
5252
services:
53-
gcb-playwright-warmup:
53+
gcb-playwright-proxy:
5454
image: greencoding/gcb_playwright:v17
55-
gcb-playwright-run:
55+
gcb-playwright-user:
5656
image: greencoding/gcb_playwright:v17
5757
5858
squid:
@@ -62,30 +62,33 @@ services:
6262
6363
flow:
6464
65-
- name: Named pipe (warmup)
66-
container: gcb-playwright-warmup
65+
- name: Named pipe (proxy-cache-warmup)
66+
container: gcb-playwright-proxy
6767
commands:
6868
- type: console
6969
command: mkfifo /tmp/my_fifo_warmup
70+
hidden: true
7071
71-
- name: Named pipe (run)
72-
container: gcb-playwright-run
72+
- name: Named pipe (user)
73+
container: gcb-playwright-user
7374
commands:
7475
- type: console
7576
command: mkfifo /tmp/my_fifo_run
77+
hidden: true
7678
77-
- name: Startup (warmup)
78-
container: gcb-playwright-warmup
79+
- name: Startup (proxy-cache-warmup)
80+
container: gcb-playwright-proxy
7981
commands:
8082
- type: console
8183
detach: true
8284
command: python3 /tmp/repo/visit.py --fifo-path /tmp/my_fifo_warmup
8385
read-notes-stdout: true
8486
log-stdout: true
8587
log-stderr: true
88+
hidden: true
8689
87-
- name: Startup (run)
88-
container: gcb-playwright-run
90+
- name: Startup Browser
91+
container: gcb-playwright-user
8992
commands:
9093
- type: console
9194
detach: true
@@ -96,34 +99,38 @@ flow:
9699
97100
98101
- name: Pause (both)
99-
container: gcb-playwright-warmup
102+
container: gcb-playwright-proxy
100103
commands:
101104
- type: console
102105
command: sleep 2
103106
read-notes-stdout: true
104107
log-stdout: true
105-
log-stderr: true`
108+
log-stderr: true
109+
hidden: true`
106110

111+
// technically we do not support multiple pages atm and when supplying this will fail in GMT due to name conflicts
107112
pages.forEach((el, index) => {
108113
fileContent = `${fileContent}
109114
110-
- name: Warmup ${el.replaceAll('/','_')} (max. 5 s)
111-
container: gcb-playwright-warmup
115+
- name: Warmup Proxy Caches and idle
116+
container: gcb-playwright-proxy
112117
commands:
113118
- type: console
114119
shell: bash
115120
command: echo "https://${el}" > /tmp/my_fifo_warmup && sleep 5
116121
read-notes-stdout: true
117122
log-stdout: true
118-
log-stderr: true`
123+
log-stderr: true
124+
hidden: true`
119125

120126
})
121127

128+
// technically we do not support multiple pages atm and when supplying this will fail in GMT due to name conflicts
122129
pages.forEach((el, index) => {
123130
fileContent = `${fileContent}
124131
125-
- name: Go to and idle ${el.replaceAll('/','_')} (max. 5 s)
126-
container: gcb-playwright-run
132+
- name: Browse to and idle
133+
container: gcb-playwright-user
127134
commands:
128135
- type: console
129136
shell: bash
@@ -135,14 +142,15 @@ flow:
135142

136143
fileContent = `${fileContent}
137144
138-
- name: Dump Log
145+
- name: Dump Log (proxy-cache-warmup)
139146
container: squid
140147
commands:
141148
- type: console
142149
command: cat /apps/squid/var/logs/access.log
143150
read-notes-stdout: true
144151
log-stdout: true
145152
log-stderr: true
153+
hidden: true
146154
`;
147155

148156
// GitHub API endpoint for creating or updating a file

index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,12 @@ <h2 class="ui image header">
101101
</div>
102102
</div>
103103
</div>
104+
<!--
104105
<div class="spacer" style="height: 10px;"></div>
105106
<div class="field" style="text-align: right;">
106107
<a class="ui left icon label add-page" onclick="addField()">+ Add a page </a>
107108
</div>
109+
-->
108110
<div class="field">
109111
<div class="ui left icon input">
110112
<i class="envelope icon"></i>

0 commit comments

Comments
 (0)