This fixes a couple of issues noticed as part of 5.2.0 update on nightshade, where ping of 'activities' in web was hanging, but the webclient continued to ping every 5 seconds. Now, we only re-try to get activities 5 seconds AFTER the previous call returns successfully. Also add a try/except around the cast of string to proxy object where it was missing for scripts.
To test, check that scripts run OK and results are returned in the activities panel. Also try an OMERO.figure export.