- Removed unused dockerOptions from DockerOrchestrator and all manager classes - Updated container-manager to use NanoCpus for CPU limits instead of CpuQuota/CpuPeriod - Fixed resource limit enforcement in container configuration - Improved test reliability and error handling - Cleaned up test files and removed unused code
21 lines
579 B
TypeScript
21 lines
579 B
TypeScript
import Debug from 'debug';
|
|
import jsonLogic from 'json-logic-js';
|
|
|
|
const debug = Debug('rz:scratch:jsonlogic');
|
|
const { apply } = jsonLogic;
|
|
|
|
// Example of using jsonLogic's map operation
|
|
const mapResult = apply({"map":[
|
|
{"var":"integers"},
|
|
{"*":[{"var":""},2]}
|
|
]}, {"integers":[1,2,3,4,5]});
|
|
debug('Map result: %o', mapResult);
|
|
|
|
// Example of using jsonLogic's reduce operation
|
|
const reduceResult = apply({"reduce":[
|
|
{"var":"integers"},
|
|
{"+":[{"var":"current"}, {"var":"accumulator"}]},
|
|
0
|
|
]}, {"integers":[1,2,3,4,5]});
|
|
debug('Reduce result: %o', reduceResult);
|