Remove ACK messages for ping, rely on

This commit is contained in:
Matt McWilliams 2023-02-25 16:33:55 -05:00
parent 8e35596088
commit 6e2795d380
11 changed files with 15 additions and 19 deletions

View File

@ -1,5 +1,5 @@
{ {
"version": "1.7.16", "version": "1.7.17",
"ext_port": 1111, "ext_port": 1111,
"profiles": { "profiles": {
"mcopy": { "mcopy": {

View File

@ -1,8 +0,0 @@
/**
* Delay in an async/await function
*
* @param {integer} ms Milliseconds to delay for
*
* @returns {Promise} Promise to resolve after timeout
**/
declare function delay(ms: number): Promise<unknown>;

View File

@ -66,7 +66,9 @@ class Server {
if (obj.id && this.queue[obj.id]) { if (obj.id && this.queue[obj.id]) {
this.queue[obj.id](obj); this.queue[obj.id](obj);
delete this.queue[obj.id]; delete this.queue[obj.id];
this.log.info(`${obj.action} complete`); if (obj.action !== 'ping') {
this.log.info(`${obj.action} ACK`);
}
} }
}.bind(this)); }.bind(this));
ws.on('close', function () { ws.on('close', function () {

File diff suppressed because one or more lines are too long

2
app/package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "mcopy-app", "name": "mcopy-app",
"version": "1.7.16", "version": "1.7.17",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {

View File

@ -1,6 +1,6 @@
{ {
"name": "mcopy-app", "name": "mcopy-app",
"version": "1.7.16", "version": "1.7.17",
"description": "GUI for the mcopy small gauge film optical printer platform", "description": "GUI for the mcopy small gauge film optical printer platform",
"main": "main.js", "main": "main.js",
"scripts": { "scripts": {

View File

@ -1,5 +1,5 @@
{ {
"version": "1.7.16", "version": "1.7.17",
"ext_port": 1111, "ext_port": 1111,
"profiles": { "profiles": {
"mcopy": { "mcopy": {

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "mcopy", "name": "mcopy",
"version": "1.7.16", "version": "1.7.17",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "mcopy", "name": "mcopy",
"version": "1.7.16", "version": "1.7.17",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"arduino": "file:app/lib/arduino", "arduino": "file:app/lib/arduino",

View File

@ -1,6 +1,6 @@
{ {
"name": "mcopy", "name": "mcopy",
"version": "1.7.16", "version": "1.7.17",
"description": "Small gauge film optical printer platform", "description": "Small gauge film optical printer platform",
"main": "build.js", "main": "build.js",
"directories": { "directories": {

View File

@ -1,5 +1,5 @@
{ {
"version": "1.7.16", "version": "1.7.17",
"ext_port": 1111, "ext_port": 1111,
"profiles": { "profiles": {
"mcopy": { "mcopy": {

View File

@ -98,7 +98,9 @@ class Server {
if (obj.id && this.queue[obj.id]) { if (obj.id && this.queue[obj.id]) {
this.queue[obj.id](obj) this.queue[obj.id](obj)
delete this.queue[obj.id] delete this.queue[obj.id]
this.log.info(`${obj.action} complete`) if (obj.action !== 'ping') {
this.log.info(`${obj.action} ACK`)
}
} }
}.bind(this)) }.bind(this))