add gitainer deploy also ignore open event
All checks were successful
Build and push image for websocket http cache / docker (push) Successful in 8s
Build and push image for websocket http cache / deploy-gitainer (push) Successful in 17s

This commit is contained in:
Martin Dimitrov 2024-09-30 12:05:39 -07:00
parent 421a91bc86
commit 31a47adc05
2 changed files with 13 additions and 1 deletions

View File

@ -19,3 +19,9 @@ jobs:
- name: Push Docker image - name: Push Docker image
run: docker image push --all-tags gitea.chromart.cc/martin/websocket-http-cache run: docker image push --all-tags gitea.chromart.cc/martin/websocket-http-cache
deploy-gitainer:
needs: docker
runs-on: ubuntu-22.04
steps:
- name: Call Gitainer stack webhook
run: curl --request POST http://192.168.1.150:9080/api/stacks/websocket-http-cache?pretty

View File

@ -20,7 +20,13 @@ export class WebSocketLifecycle {
// message is received // message is received
this.socket.addEventListener("message", event => { this.socket.addEventListener("message", event => {
console.log(`WS: ${this.socketUrl} got message`, event) console.log(`WS: ${this.socketUrl} got message`, event);
// skip storing ws open event
if (event.type === 'open') {
return;
}
this.messages = [event.data]; this.messages = [event.data];
}); });