Way to hide "Executing Task" popup for system.util.sendRequest?

I have a script that runs on the gateway that involves going through a lot of folders and comparing them to folders we expect. Depending on the depth this can take a few minutes. I had not used system.util.sendRequest and thought it would be easier than sending a message to the gateway, and the sending one back, and setting up a client event handler. I was not expecting this to show up though which seems to kind of defeat the purpose of having it run on gateway out of sight and mind of the client user.

Is there a way to disable this popup from showing? Or to get around this must I necessarily have the gateway send a message back to a client message handler?

You should not be running sendRequest in the foreground. Use system.util.invokeAsynchronous().

I am. This is my code

payload = {"level":event.source.parent.level}

def runCheck():
	print results
	def reportToGui(results):
		if "err" in results.keys():
			system.gui.warningBox("Error running customer check, tell Brian")
			system.gui.messageBox("Completed customer check")

Ignore the reportToGui part, didn’t even invokeLater it as this issue started.

I am using 8.0.17.

Show your code.

Hmm. Haven’t run into this. Version?

8.0.17. This particular test runs pretty quickly too, under 5 seconds for the most part, and it still pops up.

Given this

Was never answered, I assume that it probably cannot be done and I must use sendMessage to the gateway and send message back to the appropriate client.

Yes, system.util.sendMessage enable to avoid the message popup.

You can use system.util.sendRequestAsync to make the request/response interaction easier and prevent that popup. You just have to modify your logic a little bit to do:

handle = system.util.sendRequestAsync(project,messageHandler,payload,timeoutSec=180)
results = handle.get()

to get your results instead. It has some other nice convenience methods as well that you should be able to use to refactor that chunk of code.