Dataclay — Automating Digital Production
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Register
    • Login

    Templater not waiting for synchronous 'post_cmd_job' script to finish execution before marking job as done in data source.

    Scheduled Pinned Locked Moved
    Templater Event Scripts
    2
    4
    612
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Viriatoundefined
      Viriato
      last edited by

      Hello, is there any way I can make Templater only update the data source’s (Google Spreadsheet) row render status to “done” after the script “post_cmd_job” has finished execution? I’ve set “post_cmd_job_async” to false but it’s still doing it.

      Thank you!

      Jeffundefined 1 Reply Last reply Reply Quote 0
      • Jeffundefined
        Jeff @Viriato
        last edited by

        @viriato

        Unfortunately, there’s no way to alter when a Job’s render-status
        is updated. However, it should be possible to run an Event Script on the post_cmd_output event rather than post_cmd_job. That would run the script post output but before Templater updates the render-status value in the data source. It would also need to be run synchronously in order to ensure that the script finishes before the render-status is updated.

        Hopefully, that helps with what you’re trying to achieve, but if you continue to run into problems, we’ll need to get some more information about what you’re attempting to do so we can make a more targeted suggestion.

        Thanks!

        Viriatoundefined 1 Reply Last reply Reply Quote 1
        • Viriatoundefined
          Viriato @Jeff
          last edited by

          @jeff

          Have tried it configuring it so it runs the script on post_cmd_output but it’s also not waiting for the script to finish. We currently have another application that periodically reads the data source to check if the row has been marked as “done” so it can pull a GCloud Storage asset, which is uploaded by the script in question. If the row is marked as “done” before the rendered output is uploaded to the bucket, when our app tries to fetch it, it doesn’t exist.

          We could solve for this by having the script communicate directly with our app stating that the upload had been completed and go from there, but are looking into a more elegant solution incorporating Templater if possible!

          Thank you

          Jeffundefined 1 Reply Last reply Reply Quote 0
          • Jeffundefined
            Jeff @Viriato
            last edited by

            @viriato

            Hmmm. That’s quite odd. One thing to check would be to see what the value of post_cmd_output_async is in the templater-options.json file. That key should be set to false to enable synchronous execution, which should keep the post_cmd_job action from setting the render-status to done until the script is completed.

            If that doesn’t make any difference, we might need to get some additional information on what actions the script is performing. If that ends up being the case and you’d like to provide that information in a less public setting, please feel free to email our support channel directly at support@dataclay.com

            Thanks!

            1 Reply Last reply Reply Quote 0
            • First post
              Last post