diff options
| author | Ralph Amissah <ralph.amissah@gmail.com> | 2019-02-26 18:02:26 -0500 | 
|---|---|---|
| committer | Ralph Amissah <ralph.amissah@gmail.com> | 2019-05-17 16:59:38 -0400 | 
| commit | 65623d72e0b67556b13fad50814cd680994d57f9 (patch) | |
| tree | 0d2b3f80b4f816e77b5ee3add1a6141ce5c32f2b | |
| parent | getopt (diff) | |
parallel & serial processing logic
| -rw-r--r-- | org/doc_reform.org | 15 | ||||
| -rwxr-xr-x | src/doc_reform/doc_reform.d | 15 | 
2 files changed, 26 insertions, 4 deletions
| diff --git a/org/doc_reform.org b/org/doc_reform.org index 9be2480..c47d00c 100644 --- a/org/doc_reform.org +++ b/org/doc_reform.org @@ -510,10 +510,21 @@ struct OptActions {    }    auto parallelise() {      bool _is; -    if (opts["parallel"] == true -    || (opts["parallel"] != false && opts["serial"] == false)) { +    if (opts["parallel"] == true) {        _is = true;        if (sqlite_shared_db_action) { _is = false; } +    } else if (opts["parallel"] == false +    && opts["serial"] == true) { +      _is = false; +    } else if (opts["abstraction"] +      || concordance +      || epub +      || html +      || manifest +      || pod +      || source +    ) { +      _is = true;      } else { _is = false; }      return _is;    } diff --git a/src/doc_reform/doc_reform.d b/src/doc_reform/doc_reform.d index fc93a6c..bac1f44 100755 --- a/src/doc_reform/doc_reform.d +++ b/src/doc_reform/doc_reform.d @@ -319,10 +319,21 @@ void main(string[] args) {      }      auto parallelise() {        bool _is; -      if (opts["parallel"] == true -      || (opts["parallel"] != false && opts["serial"] == false)) { +      if (opts["parallel"] == true) {          _is = true;          if (sqlite_shared_db_action) { _is = false; } +      } else if (opts["parallel"] == false +      && opts["serial"] == true) { +        _is = false; +      } else if (opts["abstraction"] +        || concordance +        || epub +        || html +        || manifest +        || pod +        || source +      ) { +        _is = true;        } else { _is = false; }        return _is;      } | 
