daisy/pipeline

Webservice comes up before all the scripts are loaded

Opened this issue · 1 comments

➜  daisy-pipeline cli/dp2 help
...
Script commands:

        daisy3-to-daisy202          Transforms an audio-only DAISY 3 DTB into an audio-only DAISY 2.02 DTB. [v1.0.1]
        dtbook-to-zedai             Transforms DTBook XML into ZedAI XML. [v1.1.1]
        dtbook-to-html              Transforms DTBook XML into HTML. [v1.1.1]
        daisy3-to-epub3             Transforms a DAISY 3 publication into an EPUB 3 publication. [v1.1.3]
        nimas-fileset-validator     Validate a NIMAS Fileset. Supports inclusion of MathML. [v1.1.1]
        epub3-to-pef                Transforms a EPUB 3 publication into a PEF. [v1.2.1]
...
(couple of seconds later)
...
➜  daisy-pipeline cli/dp2 help
...
Script commands:

        html-to-epub3               Transforms (X)HTML documents into an EPUB 3 publication. [v1.2.1]
        dtbook-validator            Validates DTBook documents. Supports inclusion of MathML. [v1.1.1]
        dtbook-to-zedai             Transforms DTBook XML into ZedAI XML. [v1.1.1]
        dtbook-to-html              Transforms DTBook XML into HTML. [v1.1.1]
        epub3-to-daisy202           Transforms an EPUB 3 publication into DAISY 2.02. [v1.1.1]
        epub3-validator             Validates a EPUB. [v1.1.1]
        dtbook-to-daisy3            Converts multiple DTBooks to DAISY 3 format [v2.1.1]
        daisy3-to-epub3             Transforms a DAISY 3 publication into an EPUB 3 publication. [v1.1.3]
        nimas-fileset-validator     Validate a NIMAS Fileset. Supports inclusion of MathML. [v1.1.1]
        daisy202-validator          Validates a DAISY 2.02 fileset. [v1.1.1]
        daisy3-to-daisy202          Transforms an audio-only DAISY 3 DTB into an audio-only DAISY 2.02 DTB. [v1.0.1]
        zedai-to-html               Transforms ZedAI XML (ANSI/NISO Z39.98-2012 Authoring and Interchange) into HTML. [v1.1.1]
        dtbook-to-pef               Transforms a DTBook (DAISY 3 XML) document into a PEF. [v4.0.1]
        html-to-pef                 Transforms a HTML document into a PEF. [v2.5.1]
        dtbook-to-epub3             Converts multiple dtbooks to EPUB 3 format [v1.3.1]
        zedai-to-epub3              Transforms a ZedAI (DAISY 4 XML) document into an EPUB 3 publication. [v1.3.1]
        zedai-to-pef                Transforms a ZedAI (DAISY 4 XML) document into a PEF. [v3.3.2]
        epub3-to-pef                Transforms a EPUB 3 publication into a PEF. [v1.2.1]
        daisy202-to-epub3           Transforms a DAISY 2.02 publication into an EPUB 3 pu

This is most likely only a problem for CLI-users.

Some possible solutions:

  • make CLI wait for N seconds after getting /alive response before getting /scripts
  • make it so that the webservice doesn't come up if some scripts cannot be loaded
  • specify a list of services in some configuration files that we want loaded before the webservice goes up

There was a similar problem in the GUI which I fixed here.