How does DT3 handle simultaneous automation requests?

I am trying to sort out a situation where an external Applescript sometimes works and sometimes appears to either time out or to get an error that an x-Devonthik-Item is invalid when I know it is valid.

This happens almost exclusively but not entirely one one of my several databases - the database where it happens is very busy with lots of smart rules to process incoming RSS feeds.

This has led me to theorize that perhaps the cause is a conflict of simultaneous scripts.

Thus my question… if an Applescript running via Keyboard Maestro queries the DT3 database at the same time DT3 is processing a smart rule on the same database or otherwise doing a data-intensive operation on the same database, what will happen? Will both attempts to access the database occur simultaneously albeit slowly? Or will the internal base activity initiated by DT3 take priority over a database query via Applescript from some other app?

1 Like

In case of internal smart rules & scripts everything’s automatically handled but requests from external scripts (e.g. Keyboard Maestro) are performed as soon as possible. Therefore conflicts under heavy load are not impossible.

1 Like

Is the solution to the heavy loads to insert some sort of wait in a script? Is there (or could you add to DT3) some timeout parameter so a script waits its turn rather than timing out and terminating?

You could add this to your script:

with timeout of x seconds
	-- Insert your code here
end timeout

But in the end it depends on the error handling of the script.

2 Likes