pinokiod 3.15.4 → 3.15.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/kernel/index.js CHANGED
@@ -294,6 +294,7 @@ class Kernel {
294
294
  }
295
295
  let network_running = await this.network_running()
296
296
  console.log({ network_running })
297
+ console.log({ refreshing: this.processes.refreshing })
297
298
  if (network_running) {
298
299
 
299
300
 
package/kernel/procs.js CHANGED
@@ -130,24 +130,28 @@ class Procs {
130
130
  this.port_cb = cb
131
131
  this.port_running = true
132
132
  if (sh) {
133
+ console.log("Shell exists")
133
134
  this.emit(id, cmd)
134
135
  } else {
136
+ console.log("Shell doesn't exist. create one")
135
137
  this.kernel.exec({
136
138
  id,
137
139
  conda: {
138
140
  skip: true,
139
141
  },
140
142
  onready: () => {
141
- // console.log("ON READY")
143
+ console.log("ON READY", { id, cmd })
142
144
  this.emit(id, cmd)
143
145
  },
144
146
  input: true
145
147
  }, (e) => {
146
148
  if (e.state && e.state.includes(cls)) {
149
+ console.log({ port_running: this.port_running })
147
150
  if (this.port_running) {
148
151
  this.port_running = false
149
- // console.log("GET PIDS")
152
+ console.log("GET PIDS")
150
153
  this.get_pids(e.state).then((pids) => {
154
+ console.log({ pids })
151
155
  this.portPidList = pids
152
156
  this.port_cb(pids)
153
157
  })
@@ -236,23 +240,25 @@ class Procs {
236
240
  }
237
241
  }
238
242
  async refresh() {
243
+ console.log("Procs.refresh")
239
244
  let map = {}
240
- if (this.refreshing) {
241
- // console.log("still refreshing. retry later")
242
- return
243
- }
244
245
  this.refreshing = true
245
246
  let ts = Date.now()
246
247
  let list = await new Promise((resolve, reject) => {
247
248
  // console.time(">>>>>>>>GET PORTS " + ts)
249
+ console.log("get ports")
248
250
  this.getPortPidList((portPidList) => {
249
- console({ portPidList })
251
+ console.log("done: get ports")
252
+ console.log({ portPidList })
250
253
  // console.timeEnd(">>>>>>>>GET PORTS " + ts)
251
254
  // console.time(">>>>>>> GET PIDS " + ts)
252
255
  // if there's any new port, run getPidToNameMap
253
256
 
254
257
 
258
+ console.log("getPid")
255
259
  this.getPidToNameMap(portPidList, (pidToName) => {
260
+ console.log("done getPid")
261
+
256
262
  // console.timeEnd(">>>>>>> GET PIDS " + ts)
257
263
  let list = portPidList.map(({ port, pid, ip }) => {
258
264
  const fullname = pidToName[pid] || 'Unknown';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.15.4",
3
+ "version": "3.15.6",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {