{"action":"created","issue":{"url":"https://api.github.com/repos/JiscRDSS/archivematica/issues/53","repository_url":"https://api.github.com/repos/JiscRDSS/archivematica","labels_url":"https://api.github.com/repos/JiscRDSS/archivematica/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/JiscRDSS/archivematica/issues/53/comments","events_url":"https://api.github.com/repos/JiscRDSS/archivematica/issues/53/events","html_url":"https://github.com/JiscRDSS/archivematica/pull/53","id":283410984,"number":53,"title":"MCPClient: single-threaded implementation","user":{"login":"sevein","id":606459,"avatar_url":"https://avatars2.githubusercontent.com/u/606459?v=4","gravatar_id":"","url":"https://api.github.com/users/sevein","html_url":"https://github.com/sevein","followers_url":"https://api.github.com/users/sevein/followers","following_url":"https://api.github.com/users/sevein/following{/other_user}","gists_url":"https://api.github.com/users/sevein/gists{/gist_id}","starred_url":"https://api.github.com/users/sevein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sevein/subscriptions","organizations_url":"https://api.github.com/users/sevein/orgs","repos_url":"https://api.github.com/users/sevein/repos","events_url":"https://api.github.com/users/sevein/events{/privacy}","received_events_url":"https://api.github.com/users/sevein/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"sevein","id":606459,"avatar_url":"https://avatars2.githubusercontent.com/u/606459?v=4","gravatar_id":"","url":"https://api.github.com/users/sevein","html_url":"https://github.com/sevein","followers_url":"https://api.github.com/users/sevein/followers","following_url":"https://api.github.com/users/sevein/following{/other_user}","gists_url":"https://api.github.com/users/sevein/gists{/gist_id}","starred_url":"https://api.github.com/users/sevein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sevein/subscriptions","organizations_url":"https://api.github.com/users/sevein/orgs","repos_url":"https://api.github.com/users/sevein/repos","events_url":"https://api.github.com/users/sevein/events{/privacy}","received_events_url":"https://api.github.com/users/sevein/received_events","type":"User","site_admin":false},"assignees":[{"login":"sevein","id":606459,"avatar_url":"https://avatars2.githubusercontent.com/u/606459?v=4","gravatar_id":"","url":"https://api.github.com/users/sevein","html_url":"https://github.com/sevein","followers_url":"https://api.github.com/users/sevein/followers","following_url":"https://api.github.com/users/sevein/following{/other_user}","gists_url":"https://api.github.com/users/sevein/gists{/gist_id}","starred_url":"https://api.github.com/users/sevein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sevein/subscriptions","organizations_url":"https://api.github.com/users/sevein/orgs","repos_url":"https://api.github.com/users/sevein/repos","events_url":"https://api.github.com/users/sevein/events{/privacy}","received_events_url":"https://api.github.com/users/sevein/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2017-12-20T00:18:58Z","updated_at":"2017-12-20T14:20:54Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/JiscRDSS/archivematica/pulls/53","html_url":"https://github.com/JiscRDSS/archivematica/pull/53","diff_url":"https://github.com/JiscRDSS/archivematica/pull/53.diff","patch_url":"https://github.com/JiscRDSS/archivematica/pull/53.patch"},"body":"[RDSSARK-374](https://jiscdev.atlassian.net/browse/RDSSARK-374)\r\n\r\nThis pull request introduces a simplified version of MCPClient where threaded workers are replaced by a single worker loop in the main thread. This loop is now forced to exit by a signal handler `quit` when `SIGINT` or `SIGTERM` signals are received.\r\n\r\nThis implementation forces the worker to exit immediately which is potentially better than having ECS killing it after the 30 seconds timeout is exceeded. This causes the running jobs to stop and Gearman will eventually schedule them to the next available worker."},"comment":{"url":"https://api.github.com/repos/JiscRDSS/archivematica/issues/comments/353075222","html_url":"https://github.com/JiscRDSS/archivematica/pull/53#issuecomment-353075222","issue_url":"https://api.github.com/repos/JiscRDSS/archivematica/issues/53","id":353075222,"user":{"login":"sevein","id":606459,"avatar_url":"https://avatars2.githubusercontent.com/u/606459?v=4","gravatar_id":"","url":"https://api.github.com/users/sevein","html_url":"https://github.com/sevein","followers_url":"https://api.github.com/users/sevein/followers","following_url":"https://api.github.com/users/sevein/following{/other_user}","gists_url":"https://api.github.com/users/sevein/gists{/gist_id}","starred_url":"https://api.github.com/users/sevein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sevein/subscriptions","organizations_url":"https://api.github.com/users/sevein/orgs","repos_url":"https://api.github.com/users/sevein/repos","events_url":"https://api.github.com/users/sevein/events{/privacy}","received_events_url":"https://api.github.com/users/sevein/received_events","type":"User","site_admin":false},"created_at":"2017-12-20T14:20:54Z","updated_at":"2017-12-20T14:20:54Z","author_association":"COLLABORATOR","body":"> The transition from a threaded app to single-threaded looks good too - is this something we will want for all deployments of MCPClient going forward or just something for Jisc? I wonder if maybe we should be retaining the threaded version for other deployment scenarios? For example when there isn't a watchdog to ensure the mcpclient service(s) is still running.\r\n\r\nThat's actually a very good idea. If I add the single-threaded version as a new executable, e.g. `archivematicaSingleClient.py`, then we'll be able to upstream this work to vanilla in a backward-compatible manner. I'll do that, it shouldn't be hard. Thanks for the idea.\r\n\r\n> My other concern is that we're removing a lib file from archivematicaCommon, because it's no longer used in archivematicaClient.py. Is this only place where the detectCores was being used? If so then fine, we can resurrect from history if it's needed again, otherwise it should be left in.\r\n\r\nI don't delete code unless I confirm it's dead code but with your suggestion if the old entry point remains I'll also have to restore that module.\r\n\r\nThank you so much!"}}
{"actor":{"display_login":"sevein"}}