dcp-worker 4.4.0 → 4.4.1

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/bin/dcp-worker CHANGED
@@ -581,9 +581,6 @@ async function main()
581
581
 
582
582
  worker.runInfo.type = 'dcp-worker';
583
583
  worker.on('warning', (...payload) => console.warn (...payload));
584
- worker.on('stop', () => { console.log(' - Worker is stopping'); workerIsStopping = true });
585
- worker.on('end', () => { console.log(' * Worker has stopped') });
586
- worker.on('job', job => console.log(` . Job: ${job.name} ${job.id.slice(0,8)} ${job.description || ''} ${job.link || ''}`));
587
584
  worker.on('claim', amount => console.log(` . transfered ${amount} ⊇ to ${worker.config.paymentAddress}`));
588
585
 
589
586
  await processCliOptsPhase2(remainArgv, operatingMode, loggingOptions);
@@ -645,7 +642,7 @@ async function main()
645
642
  if ((workerInfo = await require('../lib/worker-info').getEvaluatorInformation(sandboxConfig)))
646
643
  break;
647
644
  if (i === 0 && operatingMode.unmanaged !== true)
648
- utils.noteWorkerStart();
645
+ utils.noteWorkerStart(worker);
649
646
  if (performance.now() - ts > 100)
650
647
  console.throb();
651
648
  await a$sleep(Math.max(i + 1, 10) / 4);
@@ -784,6 +781,9 @@ async function main()
784
781
  console.info(` ! not claming earnings in the amount of ${amount} ⊇ (can claim later)`);
785
782
  }
786
783
 
784
+ worker.on('stop', () => { console.log(' - Worker is stopping'); workerIsStopping = true });
785
+ worker.on('end', () => { console.log(' * Worker has stopped') });
786
+ worker.on('job', job => console.log(` . Job: ${job.name} ${job.id.slice(0,8)} ${job.description || ''} ${job.link || ''}`));
787
787
  console.info(' * Ready.\n');
788
788
  await worker.start();
789
789
  } /* main() */
package/lib/utils.js CHANGED
@@ -382,20 +382,13 @@ exports.patchWorkerId = async function patchWorkerId(lookupFields)
382
382
  */
383
383
  exports.noteWorkerStart = async function noteWorkerStart(worker)
384
384
  {
385
- const { DistributiveWorker } = require('dcp/worker');
386
- if (worker?.config?.unmanaged)
385
+ if (worker.config?.unmanaged)
387
386
  return;
388
387
 
389
- const db = await DistributiveWorker.jnuConnect();
390
- db.changeOrAdd({
391
- table: 'w$workerRunInfo',
392
- prototype: {
393
- workerOpaqueId: DistributiveWorker.obtainWorkerId(),
394
- lastStartTime: new Date(),
395
- status: 'running',
396
- }
397
- });
398
- exports.noteWorkerStart.db = db;
388
+ return worker.updateRunInfo({
389
+ lastStartTime: new Date(),
390
+ status: 'running',
391
+ }, true);
399
392
  }
400
393
 
401
394
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dcp-worker",
3
- "version": "4.4.0",
3
+ "version": "4.4.1",
4
4
  "description": "Node.js Worker for Distributive Compute Platform",
5
5
  "main": "bin/dcp-worker",
6
6
  "keywords": [
@@ -39,7 +39,7 @@
39
39
  "blessed": "0.1.81",
40
40
  "blessed-contrib": "4.11.0",
41
41
  "chalk": "4.1.2",
42
- "dcp-client": "^5.5.5",
42
+ "dcp-client": "^5.6.0",
43
43
  "kvin": "^9.0.0",
44
44
  "posix-getopt": "1.2.1",
45
45
  "semver": "7.7.3",
@@ -75,10 +75,8 @@
75
75
  },
76
76
  "dbus-next": {
77
77
  "xml2js": "0.6.2",
78
- "tar": "7.5.9",
79
- "usocket": {
80
- "node-gyp": "10.0.1"
81
- }
78
+ "tar": "7.5.11",
79
+ "usocket": "1.0.2"
82
80
  }
83
81
  }
84
82
  }
@@ -10,6 +10,7 @@
10
10
  <html lang="en">
11
11
  <head>
12
12
  <meta charset="UTF-8">
13
+ <meta name="viewport" content="width=device-width, height=device-height initial-scale=1">
13
14
  <title>DCP Worker - HUD</title>
14
15
  <link rel="stylesheet" type="text/css" href="./hud-common.css">
15
16
  <script src="/etc/dcp-config.js"></script>
@@ -24,12 +25,13 @@ window.addEventListener('unhandledrejection', ev => dcp['dom-tk'].modals.alert(e
24
25
  </script>
25
26
  <style type="text/css">
26
27
  HTML, BODY {
27
- height: 100%;
28
- width: 100%;
29
- min-height: 100%; /* opera */
28
+ min-height: 100vh;
29
+ min-width: 100vh;
30
+ height: 100vh;
30
31
  margin: 0;
31
32
  padding: 0;
32
- overflow: hidden;
33
+ overflow-x: hidden;
34
+ overflow-y: auto;
33
35
  }
34
36
 
35
37
  DIV#dcp-logo {
@@ -55,7 +57,7 @@ BODY[show-logo="false"] DIV#dcp-logo-header {
55
57
 
56
58
  #loggerText {
57
59
  white-space: pre-wrap;
58
- position: absolute;
60
+ position: fixed;
59
61
  bottom: 0;
60
62
  max-height: 100%;
61
63
  width: 100%;
@@ -63,7 +65,7 @@ BODY[show-logo="false"] DIV#dcp-logo-header {
63
65
  overflow-y: scroll;
64
66
  text-overflow: ellipsis;
65
67
  text-wrap: nowrap;
66
- padding: 5px;
68
+ padding: 15px;
67
69
  }
68
70
 
69
71
  TABLE