Hi.
I’m now trying to create custom Event Plugin.
As a starting point, I implemented the following script and place it into custom/events folder.
My slave log says “Detected new event plugin XXX in the Repository, it will now be initialized” but after waiting for a while I can’t find the log message (Cleaning Callback Event Plugin) anywhere.
The interval of house cleaning is 60 seconds.
Do you know where this log is being ouput?
from Deadline.Events import *
from Deadline.Scripting import RepositoryUtils
def GetDeadlineEventListener():
return CleaningCallback()
def CleanupDeadlineEventListener(deadlinePlugin):
deadlinePlugin.Cleanup()
class CleaningCallback (DeadlineEventListener):
"""This is the main DeadlineEventListener class for ScheduledEvent."""
def __init__(self):
# Set up the event callbacks here
self.OnHouseCleaningCallback += self.OnHouseCleaning
def Cleanup(self):
del self.OnHouseCleaningCallback
def OnHouseCleaning(self):
self.LogInfo("Cleaning Callback Event Plugin")
Yeah this kinda sucks, it is not written in the job output in the Monitor anywhere. You can find it in the log files of the worker, but seems like it is not exposed in Monitor.
I checked the worker’s log and there was no expected output (Cleaning Callback Event Plugin).
The log is in the C:/ProgramData/Thinkbox/Deadlinexx/logs of my worker machine.
If you’ve got a Remote Connection Server or Pulse they’ll take over running House Cleaning for the Workers. You can also isolate the house cleaning logs to their own file using a setting in the Monitor under Tools → Configure Repository Options → House Cleaning → House Cleaning.
You can also manually trigger it from the Monitor under in the Monitor under Tools → Perform House Cleaning and you’ll see your event in the Monitor’s log or Console panel.
Personally, I add a __main__() to my event plugin file and call it with "%deadline_path%" \deadlinecommand -executeScript myEven.py. Then call my callback in the main, providing it with a test job if needed, or nothing at all if the callback doesn’t take any inputs. You can check the needed inputs in our docs here, highlighting OnJobFinished as it takes more than self.
The problem with logging has been resolved, but We are having trouble getting information about jobs using the RepositoryUtils module.
If you have any idea why we can’t get the information, please let us know.
We can get a Job object only if we specify the job id.
GetJobIds, GetSlaveNames, GetPools, etc. also return nothing, as does GetJobs.