AWS Thinkbox Discussion Forums

OnJobFinishedCallback not firing

I’ve added a new Global event to the repository – OnJobSubmittedCallback gets called but OnJobFinishedCallback does not. NOTE: the event report is added to the job only for job submitted.

I’m using 8.0.0.55 on Windows.

We’re having difficulty reproducing this on our end, would you be able to provide a copy of the offending event plugin?

Below is my event. I’m expecting an event log for the job but am not seeing one. NOTE: the job is marked as completed in the Monitor.

def GetDeadlineEventListener():
return TestEvent()

def CleanupDeadlineEventListener( deadlinePlugin ):
deadlinePlugin.Cleanup()

class TestEvent (DeadlineEventListener):
def init( self ):
# Set up the event callbacks here
self.OnJobFinishedCallback += self.OnJobFinished

def Cleanup( self ): 
    del self.OnJobFinishedCallback
        
def OnJobFinished( self, job ): 
    self.LogInfo( "TestEvent OnJobFinished " )

It would appear that marking a job as complete does not trigger that event. The event will still be triggered when the job is finished by the slave. We will look into fixing this, thanks for reporting this!

well, I’m running a job and the slave finishes the task which results in the job being marked completed. I don’t seem to get the event. I’m running my job by running a custom submission script from the Submit menu which then runs a custom plugin script (calls ClientUtils.ExecuteCommandAndGetOutput with the job info file and plugin info file). The only job properties I set are the plugin, name, and frames.

Where are you looking for the event log? I’m seeing event logs for onJobFinished in job reports for the job that was completed when the slave finishes rendering the last task.

I’m looking in the Job reports for the job – the documentation says that the “OnJob…” events will show up in the job reports. I see 2 reports: 1 render log and 1 event log (OnJobSubmitted). Below is all I get in the event log.

=======================================================
Log

2016-03-24 14:35:47: BEGIN - xxxxx
2016-03-24 14:35:47: INFO: TestEvent OnJobSubmitted

=======================================================
Details

Date: 03/24/2016 14:35:47
Event Type: OnJobSubmitted
Frames: (no task)
Job User: ggirod
Job Submit Date: 03/24/2016 14:35:25

Very strange. Can you supply the scripts you are running for submitting the job, the plugin that is rendering and the full event plugin? I have tried the following:

  1. Updated the sample script you provided, adding a onJobSubmitted callback that changes some job properties and saves the job
  2. submitted a job with a single task, confirmed that the event log was created for onJobSubmitted
  3. Slave picks up job and renders it, confirmed that the job report and the event log for onJobFinished are both generated

If you can upload a zip file containing the scripts I requested that would be ideal. You can also post the contents on the forum. If you do the latter, please put the code between code tags so the formatting is preserved :slight_smile:

See the attached zip. I created a submission script, the test event, a test rendering app, and the test plugin. When I submit the job, I only get the OnJobSubmitted event.

OnJobFinishedBug.zip (6.61 KB)

Just to be clear, that’s the only event you should be getting when you submit the job. OnJobFinished requires the job to be completed or failed (and it seems to require the Slave to be the one to do it, which can be accomplished by just letting the Slave render the job ).

I tested the scripts you gave me and I’m still seeing the expected behavior. OnJobSubmitted is generated on submission and OnJobFinished is generated when the Slave finishes rendering the job. Both of these event logs are found in the job reports panel along with the job’s render log.

If you go to Configure Repository Options -> House Cleaning -> Pending Job Scan is Asynchronous Job Events enabled? If so, you need to run a Pending Job scan after certain events before they’ll be triggered. Disabling that setting will cause the event to trigger immediately after the action that should cause the event.

On my setup, I’m only seeing the submit job event. After the slave finishes, I check the job reports and only see 1 event being logged. Something on our systems is preventing the onjobfinished from firing.

Have you checked if you had Asynchronous Job Events enabled? That may be what’s causing your problem.

I think I’ve reproduced the bug.

I put the event in the DeadlineRepository8\events folder because the system won’t recognize the event if I put it in the custom\events folder. I then remove the event by removing the folder and then run “Synchronize Scripts and Plugins”. If I submit the job, I actually keep getting the OnJobSubmitted event even though I’ve “removed” the event but I no longer get the OnJobFinished. If I copy my event folder back to DeadlineRepository8\events, submit my job again, synch scripts and pluging, I still don’t get the OnJobFinished event.

So it seems like if I remove my event folder from DeadlineRepository8\events, the bug gets introduced.

Privacy | Site terms | Cookie preferences