{"action":"created","issue":{"url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/3790","labels_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/3790/labels{/name}","comments_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/3790/comments","events_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/3790/events","html_url":"https://github.com/openmicroscopy/openmicroscopy/pull/3790","id":73350661,"number":3790,"title":"10661 dynamic params","user":{"login":"joshmoore","id":88113,"avatar_url":"https://avatars.githubusercontent.com/u/88113?v=3","gravatar_id":"","url":"https://api.github.com/users/joshmoore","html_url":"https://github.com/joshmoore","followers_url":"https://api.github.com/users/joshmoore/followers","following_url":"https://api.github.com/users/joshmoore/following{/other_user}","gists_url":"https://api.github.com/users/joshmoore/gists{/gist_id}","starred_url":"https://api.github.com/users/joshmoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshmoore/subscriptions","organizations_url":"https://api.github.com/users/joshmoore/orgs","repos_url":"https://api.github.com/users/joshmoore/repos","events_url":"https://api.github.com/users/joshmoore/events{/privacy}","received_events_url":"https://api.github.com/users/joshmoore/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/labels/develop","name":"develop","color":"02e10c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-05-05T15:43:07Z","updated_at":"2015-07-09T18:53:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/3790","html_url":"https://github.com/openmicroscopy/openmicroscopy/pull/3790","diff_url":"https://github.com/openmicroscopy/openmicroscopy/pull/3790.diff","patch_url":"https://github.com/openmicroscopy/openmicroscopy/pull/3790.patch"},"body":"See: http://trac.openmicroscopy.org.uk/ome/ticket/10661#comment:7\r\n\r\n#### Background ####\r\n\r\nAn interesting recent bug lead to the review of the `JobParams` creation. The user-4 on merge/trout was receiving an exception when trying to run `Make_Movie.py` since the chosen color was not a member of a list of the form `[\"White\", \"Red\", None, \"Black\", None, None, None]`. What seems to have happened is that some exception (`OutOfMemory`?) caused the params themselves to be corrupted. The reason that this was only happening for user-4 (and his/her group) was that `JobParams` were being created **per group**. This unnecessary overhead was a secondary bug.\r\n\r\n#### Implementation ####\r\n\r\nRather than trying to fix the 2 underlying bugs caused by caching params for each group (and trying to clean up old params, etc.), ticket 10661 suggested reloading all scripts on server start-up. This is now possible along with 2 configuration options under the `omero.scripts.cache.` namespace:\r\n\r\n * `spec` determines the settings for the Guava cache, i.e. how quickly will the objects be freed from memory\r\n * `cron` how often will a full reloading of all the scripts be attempted. One run is always performed on startup so that the initial access by any user is not delayed.\r\n\r\n#### Functional differences ####\r\n\r\n * The general user should notice no differences in behavior.\r\n * Developers will notice that `parsejob` instances are no longer being persisted. This could conceivably be viewed as a breaking change, but considering that the job itself consists of a byte array containing the serialized form of an Ice object, it's unlikely this was of use.\r\n * Any script with the namespace \"dynamic\" (TBD) will **not** be cached, and instead will be reprocessed on each invocation. This will include sizeable overhead.\r\n * (**Planned**) Disabling the new configuration options will rollback to using the previous `ParamsHelper` method of storing `parsejobs` in the database.\r\n\r\ncc: @manics @pwalczysko @rleigh-dundee @ctrueden "},"comment":{"url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/comments/120106987","html_url":"https://github.com/openmicroscopy/openmicroscopy/pull/3790#issuecomment-120106987","issue_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/3790","id":120106987,"user":{"login":"sbesson","id":1355463,"avatar_url":"https://avatars.githubusercontent.com/u/1355463?v=3","gravatar_id":"","url":"https://api.github.com/users/sbesson","html_url":"https://github.com/sbesson","followers_url":"https://api.github.com/users/sbesson/followers","following_url":"https://api.github.com/users/sbesson/following{/other_user}","gists_url":"https://api.github.com/users/sbesson/gists{/gist_id}","starred_url":"https://api.github.com/users/sbesson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbesson/subscriptions","organizations_url":"https://api.github.com/users/sbesson/orgs","repos_url":"https://api.github.com/users/sbesson/repos","events_url":"https://api.github.com/users/sbesson/events{/privacy}","received_events_url":"https://api.github.com/users/sbesson/received_events","type":"User","site_admin":false},"created_at":"2015-07-09T18:53:30Z","updated_at":"2015-07-09T18:53:30Z","body":"Given all comments above, merging in order to fix the conflict with the decoupling branch. Thanks all."}}