Skip to content
This repository has been archived by the owner on Aug 7, 2019. It is now read-only.

PrairieLearn/zyspawn

Repository files navigation

Zyspawn project for PrairieLearn

The purpose of this library is to accelerate script execution for question generation in PrairieLearn.

Example Use

Python Script

# simple.py
def add(a, b):
    return a + b

Javascript

var zyPool = new ZygotePool(5, (err)=>{
    var zyInt = zyPool.request();
    zyInt.call("simple", "add", [1,2], {}, (err, output) => {
          // output.result == 3
          zyInt.done();
    });
});

Unit Tests

npm test

Note: If you find that lots of tests are failing to run, it may be usefull
to run tests in band mode. i.e:

npm test -- --runInBand