Skip to content

Commit f773ef3

Browse files
authored
Merge pull request #47 from plotly/periodic-restarts
Periodic restarts
2 parents 16a9104 + ccd9ac0 commit f773ef3

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

bin/plotly-export-server_electron.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ app.on('after-connect', (info) => {
6565
}
6666
})
6767

68+
var requestCount = 0
69+
6870
app.on('after-export', (info) => {
6971
if (SHOW_LOGS) {
7072
console.log(JSON.stringify({
@@ -79,6 +81,10 @@ app.on('after-export', (info) => {
7981
}
8082
}))
8183
}
84+
85+
if (requestCount++ >= 1000) {
86+
app.quit()
87+
}
8288
})
8389

8490
app.on('export-error', (info) => {

deployment/run_server

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22

33
fc-cache -v /usr/share/fonts/user
44

5-
xvfb-run --server-args '-screen 0 640x480x24' ./bin/plotly-export-server.js $@
5+
while true; do
6+
xvfb-run --auto-servernum --server-args '-screen 0 640x480x24' ./bin/plotly-export-server.js $@
7+
done

0 commit comments

Comments
 (0)