if-job-done
is a Python script that scrapes an active Keyshot instance and fires a webhook once the render state changes (finished or stopped). The webhook can be connected to e.g. IFTTT to send a push notification or email once the rendering is done.
Supports Keyshot >= 6
.
In larger computer labs there is the problem that render workstations often remain occupied for an unnecessarily long time, even though the render job is already finished. This is due to the fact that students do not have any remote information about the status of their renderings and therefore only sporadically check the workstation every few hours. This script is a robust solution to inform (e.g.) students about a finished rendering or when a render job stopped unexpectedly. With this script the usage and 'downtime' of each workstations can be optimized. The script was succesfully used in a medium sized lab (university, 30-40 workstations).
Clone the repo and run pip install --user --requirement requirements.txt
from the root directory.
Assuming that you will be using IFTTT, you must first create a IFTTT recipe to get the webhook endpoint and connect it to a action Read the IFTTT docs for more.
After the script has been started, it minimizes itself to the taskbar and runs in the background. The script must be stopped manually or the value end_if_target_process_not_running
must be set to true
in the config file.
Right click the taskbar icon to open the config file, exit the script or get status information about the current render (Idle, rendering image, rendering animation
).
Open the config.ini
file to config the script.
update_interval
- Interval in seconds in which the script is looking for a suitable Keyshot handle.finish_treshold
andstop_treshold
- Treshold in seconds after which the webhook gets fired. These settings exist to prevent webhook spam when starting or stopping many short test renderings.end_if_target_process_not_running
- End the script if Keyshot is not running. Useful if Keyshot and the script are started at the same time.web_hook
- The actual webhook URL. E.g. https://maker.ifttt.com/trigger/{eventName}/with/key/{key}