@platforma-sdk/workflow-tengo 4.7.2 → 4.7.3
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/dist/tengo/lib/exec.lib.tengo +23 -3
- package/dist/tengo/lib/pt.lib.tengo +72 -1
- package/dist/tengo/tpl/check_network.create_workdir_from_storage.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.download_blob.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.run_hello_world.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.run_hello_world_py.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.upload_blob.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.upload_template.plj.gz +0 -0
- package/dist/tengo/tpl/exec.R.create-renv.plj.gz +0 -0
- package/dist/tengo/tpl/exec.exec.plj.gz +0 -0
- package/dist/tengo/tpl/exec.monetization_info.plj.gz +0 -0
- package/dist/tengo/tpl/exec.monetization_to_json.plj.gz +0 -0
- package/dist/tengo/tpl/exec.python.create-venv.plj.gz +0 -0
- package/dist/tengo/tpl/exec.python.install-deps.plj.gz +0 -0
- package/dist/tengo/tpl/exec.python.venv-bin-path.plj.gz +0 -0
- package/dist/tengo/tpl/ll.get-field.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-multiple-pcolumns.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-pframe-for-ui.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-pframe.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-single-pcolumn.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.import-dir.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.process-pcolumn-data.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.remove-nulls.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.slice-data.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.xsv-export-pframe.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.xsv-import-if-not-null.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.xsv-import-map.plj.gz +0 -0
- package/dist/tengo/tpl/waiter.waiter.plj.gz +0 -0
- package/dist/tengo/tpl/workdir.save.plj.gz +0 -0
- package/dist/tengo/tpl/workflow.build-ctx.plj.gz +0 -0
- package/dist/tengo/tpl/workflow.query-anchored.plj.gz +0 -0
- package/package.json +2 -2
|
@@ -219,6 +219,16 @@ builder := func() {
|
|
|
219
219
|
|
|
220
220
|
|
|
221
221
|
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
setQueue: func(newQueue) {
|
|
225
|
+
queue = newQueue
|
|
226
|
+
return self
|
|
227
|
+
},
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
222
232
|
inHeavyQueue: func() {
|
|
223
233
|
queue = execConstants.HEAVY_QUEUE
|
|
224
234
|
return self
|
|
@@ -272,9 +282,9 @@ builder := func() {
|
|
|
272
282
|
|
|
273
283
|
|
|
274
284
|
|
|
275
|
-
|
|
276
|
-
validation.assertType(amount, ["or", "number", "string"], "exec.builder.
|
|
277
|
-
ll.assert(is_string(amount) || amount > 0, "exec.builder.
|
|
285
|
+
mem: func(amount) {
|
|
286
|
+
validation.assertType(amount, ["or", "number", "string"], "exec.builder.mem: RAM amount should be a number or string")
|
|
287
|
+
ll.assert(is_string(amount) || amount > 0, "exec.builder.mem: amount in bytes should be greater than 0")
|
|
278
288
|
ramRequest = amount
|
|
279
289
|
|
|
280
290
|
return self
|
|
@@ -285,6 +295,16 @@ builder := func() {
|
|
|
285
295
|
|
|
286
296
|
|
|
287
297
|
|
|
298
|
+
ram: func(amount) {
|
|
299
|
+
self.mem(amount)
|
|
300
|
+
return self
|
|
301
|
+
},
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
288
308
|
|
|
289
309
|
cache: func(time) {
|
|
290
310
|
ll.assert(
|
|
@@ -6,6 +6,7 @@ exec := import("@platforma-sdk/workflow-tengo:exec")
|
|
|
6
6
|
json := import("json")
|
|
7
7
|
text := import("text")
|
|
8
8
|
slices := import("@platforma-sdk/workflow-tengo:slices")
|
|
9
|
+
execConstants := import("@platforma-sdk/workflow-tengo:exec.constants")
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
|
|
@@ -67,6 +68,10 @@ workflow := func() {
|
|
|
67
68
|
anonymousFilesCounter := 0
|
|
68
69
|
anonymousDFCounter := 0
|
|
69
70
|
|
|
71
|
+
cpu := undefined
|
|
72
|
+
mem := undefined
|
|
73
|
+
queue := execConstants.MEDIUM_QUEUE
|
|
74
|
+
|
|
70
75
|
self := undefined
|
|
71
76
|
|
|
72
77
|
id := workflowCounter
|
|
@@ -266,13 +271,71 @@ workflow := func() {
|
|
|
266
271
|
|
|
267
272
|
|
|
268
273
|
|
|
274
|
+
inHeavyQueue: func() {
|
|
275
|
+
queue = execConstants.HEAVY_QUEUE
|
|
276
|
+
return self
|
|
277
|
+
},
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
inMediumQueue: func() {
|
|
283
|
+
queue = execConstants.MEDIUM_QUEUE
|
|
284
|
+
return self
|
|
285
|
+
},
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
inLightQueue: func() {
|
|
291
|
+
queue = execConstants.LIGHT_QUEUE
|
|
292
|
+
return self
|
|
293
|
+
},
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
inUiQueue: func() {
|
|
299
|
+
queue = execConstants.UI_TASKS_QUEUE
|
|
300
|
+
return self
|
|
301
|
+
},
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
cpu: func(amount) {
|
|
309
|
+
cpu = amount
|
|
310
|
+
return self
|
|
311
|
+
},
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
mem: func(amount) {
|
|
325
|
+
mem = amount
|
|
326
|
+
return self
|
|
327
|
+
},
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
269
332
|
|
|
270
333
|
|
|
271
334
|
|
|
272
335
|
run: func() {
|
|
273
336
|
ptablerSw := assets.importSoftware("@platforma-open/milaboratories.software-ptabler:main")
|
|
274
337
|
ptablerCmdBuilder := exec.builder().
|
|
275
|
-
|
|
338
|
+
setQueue(queue).
|
|
276
339
|
printErrStreamToStdout().
|
|
277
340
|
dontSaveStdoutOrStderr().
|
|
278
341
|
software(ptablerSw).
|
|
@@ -281,6 +344,14 @@ workflow := func() {
|
|
|
281
344
|
workflow: steps
|
|
282
345
|
}));
|
|
283
346
|
|
|
347
|
+
if !is_undefined(cpu) {
|
|
348
|
+
ptablerCmdBuilder.cpu(cpu)
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
if !is_undefined(mem) {
|
|
352
|
+
ptablerCmdBuilder.mem(mem)
|
|
353
|
+
}
|
|
354
|
+
|
|
284
355
|
for inFile in inFiles {
|
|
285
356
|
if !is_undefined(inFile.file) {
|
|
286
357
|
ptablerCmdBuilder.addFile(inFile.name, inFile.file)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platforma-sdk/workflow-tengo",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.3",
|
|
4
4
|
"description": "Tengo SDK library",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@platforma-open/milaboratories.software-ptabler": "1.6.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@platforma-sdk/tengo-builder": "^2.1.
|
|
24
|
+
"@platforma-sdk/tengo-builder": "^2.1.10"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"type-check": "pl-tengo check",
|