nfa-vfxim / deadline-balancer

A simple event plugin script to balance all workers equally over currently running projects.
https://wiki.vfxim.nl/
MIT License
0 stars 0 forks source link

deadline-balancer SyntaxWarning & DeadlineEventListener not defined #1

Open bsukhadia-fractal opened 2 months ago

bsukhadia-fractal commented 2 months ago

deadline-balancernone:99: SyntaxWarning: "is" with a literal. Did you mean "=="?

https://github.com/nfa-vfxim/deadline-balancer/blob/f29f564f353a245ff9f2a338f9e798212c004c70/deadline-balancer.py#L99

proposing the change, if math.ceil(percent * workers_amount) is 0: to if math.ceil(percent * workers_amount) == 0:

bsukhadia-fractal commented 2 months ago

After the proposed fix for our environment loading the event plugin results in the below error:

Event plugin 'deadline-balancer' could not be loaded from the repository because: Error executing event plugin script "\\deadlinesrv\DeadlineRepository10\custom\events\deadline-balancer\deadline-balancer.py": name 'DeadlineEventListener' is not defined (Deadline.Events.DeadlineEventPluginException)