Prevent jobArrived from triggering when previous job removed

Post Reply
User avatar
gabrielp
Advanced member
Posts: 577
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Prevent jobArrived from triggering when previous job removed

Post by gabrielp »

I have an instance where I want to do a pickup, where a job picks up another job that is in the same folder preceding the script. It works fine, but I get the following error for the file I've already sent to null:

Code: Select all

The input job does not exist: '/Users/dominickpeluso/Library/Application Support/Enfocus/Switch Server/backing/XML Pickup/automanaged/Folder 1/_001GU_ticket.xml'
I'm guessing that jobArrived is being called twice, even though ticket.xml has been sent to null. Is there another way to prevent Switch from executing jobArrived or to check if the job is still there before doing so?
Chat: open-automation @ gitter
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
User avatar
gabrielp
Advanced member
Posts: 577
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Re: Prevent jobArrived from triggering when previous job removed

Post by gabrielp »

I ended up solving this but not 100% sure what the fix was. My hunch is that somewhere in my code I was calling methods on the job object that had been removed.
Chat: open-automation @ gitter
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
Post Reply