Flow of Control
The way a scriptworker runs can be a bit confusing. It involves scriptworker itself and its configuration file, a script with its own configuration file, multiple processes, and a surprising amount of indirection. The diagram below attempts to show the flow of control. A few things are of special note:
The initial entrypoint is the
scriptworkerCLI tool.When a Task has been verified, the
scriptCLI entry point is run in a subprocess, eg:signingscript, but that will simply providescriptworker.client.sync_mainwith a few pieces of data (most notably theasync_mainthat actually acts on a Task payload) to continue execution from there. This means that there are two processes that have independently importedscriptworkercode.Task success or failure is communicated back to the
scriptworkerCLI tool through the return code of the subprocess.