I have a couple database entries that need to updated when a job is reset back to the submitted state, but don't need to be touched in the normal submission flow at that point. I would prefer to avoid the unneeded sql call if possible, so is there a method that only triggers on reset or something I can check in the Submit method to determine whether the request originated from a reset?
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
TranslationJobService.ResetJob += TranslationJobService_ResetJob;
}
private void TranslationJobService_ResetJob(TranslationStatusEventArgs e)
{
// e.Job - job with current (new status) in it
// e.OldStatus - status job has been reset from
}
Is there a way to run logic only on reset?
I have a couple database entries that need to updated when a job is reset back to the submitted state, but don't need to be touched in the normal submission flow at that point. I would prefer to avoid the unneeded sql call if possible, so is there a method that only triggers on reset or something I can check in the Submit method to determine whether the request originated from a reset?
Hi Jesse,
There wasn't an event for restting so we've added it into the next release - which we've pushed live today.
http://jumoo.localhost/translate/releases/2.3.0/
you should now be able to listen for
ResetJob
Thanks for adding that Kevin.
is working on a reply...