{"action":"created","comment":{"url":"https://api.github.com/repos/taurus-org/taurus/pulls/comments/199512036","pull_request_review_id":133643949,"id":199512036,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5OTUxMjAzNg==","diff_hunk":"@@ -108,27 +111,49 @@ def cleanUp(self):\n \n         self._thread_pool.join()\n         self._thread_pool = None\n+        self._sthread_pool.join()\n+        self._sthread_pool = None\n \n         self._state = ManagerState.CLEANED\n \n     def addJob(self, job, callback=None, *args, **kw):\n-        \"\"\"Add a new job (callable) to the queue. The new job will be processed\n-        by a separate thread\n+        \"\"\" Deprecated. Wrapper of enqueueJob. See enqueueJob documentation.\n+        \"\"\"\n+        self.deprecated(dep='addJob', alt='enqueueJob', rel='4.3.2')\n+        self.enqueueJob(job, callback=callback, jobargs=args, jobkwargs=kw)\n \n+    def enqueueJob(self, job, callback=None, jobargs=None, jobkwargs=None,\n+                   serialization_mode=None):\n+        \"\"\" Enqueue a job (callable) to the queue. The new job will be\n+        processed by a separate thread\n         :param job: (callable) a callable object\n         :param callback: (callable) called after the job has been processed\n-        :param args: (list) list of arguments passed to the job\n-        :param kw: (dict) keyword arguments passed to the job\n+        :param jobargs: (list) list of arguments passed to the job\n+        :param jobkwargs: (dict) keyword arguments passed to the job\n+        :param serialization_mode:\n+        (taurus.core.taurusbasetypes.TaurusSerializationMode) serialization\n+        mode\n         \"\"\"\n-        if self._serialization_mode == TaurusSerializationMode.Concurrent:\n+        if serialization_mode is None:\n+            serialization_mode = self._serialization_mode\n+\n+        if serialization_mode == TaurusSerializationMode.Concurrent:\n             if not hasattr(self, \"_thread_pool\") or self._thread_pool is None:\n                 self.info(\"Job cannot be processed.\")\n                 self.debug(\n-                    \"The requested job cannot be processed. Make sure this manager is initialized\")\n+                    \"The requested job cannot be processed. \" +\n+                    \"Make sure this manager is initialized\")\n                 return\n-            self._thread_pool.add(job, callback, *args, **kw)\n+            self._thread_pool.add(job, callback, jobargs, jobkwargs)\n         else:\n-            job(*args, **kw)\n+            if (not hasattr(self, \"_sthread_pool\")\n+                or self._sthread_pool is None):\n+                self.info(\"Job cannot be processed.\")\n+                self.debug(\n+                    \"The requested job cannot be processed. \" +\n+                    \"Make sure this manager is initialized\")\n+                return\n+            self._sthread_pool.add(job, callback, jobargs, jobkwargs)","path":"lib/taurus/core/taurusmanager.py","position":78,"original_position":78,"commit_id":"bf5bc1ad9ef647df8dc908e1353e32d4045cc7b8","original_commit_id":"bf5bc1ad9ef647df8dc908e1353e32d4045cc7b8","user":{"login":"cpascual","id":4115224,"node_id":"MDQ6VXNlcjQxMTUyMjQ=","avatar_url":"https://avatars2.githubusercontent.com/u/4115224?v=4","gravatar_id":"","url":"https://api.github.com/users/cpascual","html_url":"https://github.com/cpascual","followers_url":"https://api.github.com/users/cpascual/followers","following_url":"https://api.github.com/users/cpascual/following{/other_user}","gists_url":"https://api.github.com/users/cpascual/gists{/gist_id}","starred_url":"https://api.github.com/users/cpascual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpascual/subscriptions","organizations_url":"https://api.github.com/users/cpascual/orgs","repos_url":"https://api.github.com/users/cpascual/repos","events_url":"https://api.github.com/users/cpascual/events{/privacy}","received_events_url":"https://api.github.com/users/cpascual/received_events","type":"User","site_admin":false},"body":"I think that it should be self._thread_pool.add(job, callback, *jobargs, **jobkwargs)","created_at":"2018-07-02T14:16:42Z","updated_at":"2018-07-02T14:16:42Z","html_url":"https://github.com/taurus-org/taurus/pull/738#discussion_r199512036","pull_request_url":"https://api.github.com/repos/taurus-org/taurus/pulls/738","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/taurus-org/taurus/pulls/comments/199512036"},"html":{"href":"https://github.com/taurus-org/taurus/pull/738#discussion_r199512036"},"pull_request":{"href":"https://api.github.com/repos/taurus-org/taurus/pulls/738"}}},"pull_request":{"url":"https://api.github.com/repos/taurus-org/taurus/pulls/738","id":181475740,"node_id":"MDExOlB1bGxSZXF1ZXN0MTgxNDc1NzQw","html_url":"https://github.com/taurus-org/taurus/pull/738","diff_url":"https://github.com/taurus-org/taurus/pull/738.diff","patch_url":"https://github.com/taurus-org/taurus/pull/738.patch","issue_url":"https://api.github.com/repos/taurus-org/taurus/issues/738","number":738,"state":"open","locked":false,"title":"(WIP) Delegate the fireEvents to TaurusManager","user":{"login":"cmft","id":6168722,"node_id":"MDQ6VXNlcjYxNjg3MjI=","avatar_url":"https://avatars0.githubusercontent.com/u/6168722?v=4","gravatar_id":"","url":"https://api.github.com/users/cmft","html_url":"https://github.com/cmft","followers_url":"https://api.github.com/users/cmft/followers","following_url":"https://api.github.com/users/cmft/following{/other_user}","gists_url":"https://api.github.com/users/cmft/gists{/gist_id}","starred_url":"https://api.github.com/users/cmft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmft/subscriptions","organizations_url":"https://api.github.com/users/cmft/orgs","repos_url":"https://api.github.com/users/cmft/repos","events_url":"https://api.github.com/users/cmft/events{/privacy}","received_events_url":"https://api.github.com/users/cmft/received_events","type":"User","site_admin":false},"body":"Use the TaurusManager PoolThread to manage the fireEvents\r\nrespecting the \"serialization mode\" of the scheme.\r\n\r\nThis PR delegates the control of the event queue to Taurus instead of Tango\r\nwhen the serialization mode is Serial.","created_at":"2018-04-13T12:37:52Z","updated_at":"2018-07-02T14:16:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"51e4a0db663912b5007b38d09abf43e01f8ee972","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/taurus-org/taurus/pulls/738/commits","review_comments_url":"https://api.github.com/repos/taurus-org/taurus/pulls/738/comments","review_comment_url":"https://api.github.com/repos/taurus-org/taurus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/taurus-org/taurus/issues/738/comments","statuses_url":"https://api.github.com/repos/taurus-org/taurus/statuses/bf5bc1ad9ef647df8dc908e1353e32d4045cc7b8","head":{"label":"cmft:test_serialization_mode","ref":"test_serialization_mode","sha":"bf5bc1ad9ef647df8dc908e1353e32d4045cc7b8","user":{"login":"cmft","id":6168722,"node_id":"MDQ6VXNlcjYxNjg3MjI=","avatar_url":"https://avatars0.githubusercontent.com/u/6168722?v=4","gravatar_id":"","url":"https://api.github.com/users/cmft","html_url":"https://github.com/cmft","followers_url":"https://api.github.com/users/cmft/followers","following_url":"https://api.github.com/users/cmft/following{/other_user}","gists_url":"https://api.github.com/users/cmft/gists{/gist_id}","starred_url":"https://api.github.com/users/cmft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmft/subscriptions","organizations_url":"https://api.github.com/users/cmft/orgs","repos_url":"https://api.github.com/users/cmft/repos","events_url":"https://api.github.com/users/cmft/events{/privacy}","received_events_url":"https://api.github.com/users/cmft/received_events","type":"User","site_admin":false},"repo":{"id":72080397,"node_id":"MDEwOlJlcG9zaXRvcnk3MjA4MDM5Nw==","name":"taurus","full_name":"cmft/taurus","owner":{"login":"cmft","id":6168722,"node_id":"MDQ6VXNlcjYxNjg3MjI=","avatar_url":"https://avatars0.githubusercontent.com/u/6168722?v=4","gravatar_id":"","url":"https://api.github.com/users/cmft","html_url":"https://github.com/cmft","followers_url":"https://api.github.com/users/cmft/followers","following_url":"https://api.github.com/users/cmft/following{/other_user}","gists_url":"https://api.github.com/users/cmft/gists{/gist_id}","starred_url":"https://api.github.com/users/cmft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmft/subscriptions","organizations_url":"https://api.github.com/users/cmft/orgs","repos_url":"https://api.github.com/users/cmft/repos","events_url":"https://api.github.com/users/cmft/events{/privacy}","received_events_url":"https://api.github.com/users/cmft/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cmft/taurus","description":null,"fork":true,"url":"https://api.github.com/repos/cmft/taurus","forks_url":"https://api.github.com/repos/cmft/taurus/forks","keys_url":"https://api.github.com/repos/cmft/taurus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cmft/taurus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cmft/taurus/teams","hooks_url":"https://api.github.com/repos/cmft/taurus/hooks","issue_events_url":"https://api.github.com/repos/cmft/taurus/issues/events{/number}","events_url":"https://api.github.com/repos/cmft/taurus/events","assignees_url":"https://api.github.com/repos/cmft/taurus/assignees{/user}","branches_url":"https://api.github.com/repos/cmft/taurus/branches{/branch}","tags_url":"https://api.github.com/repos/cmft/taurus/tags","blobs_url":"https://api.github.com/repos/cmft/taurus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cmft/taurus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cmft/taurus/git/refs{/sha}","trees_url":"https://api.github.com/repos/cmft/taurus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cmft/taurus/statuses/{sha}","languages_url":"https://api.github.com/repos/cmft/taurus/languages","stargazers_url":"https://api.github.com/repos/cmft/taurus/stargazers","contributors_url":"https://api.github.com/repos/cmft/taurus/contributors","subscribers_url":"https://api.github.com/repos/cmft/taurus/subscribers","subscription_url":"https://api.github.com/repos/cmft/taurus/subscription","commits_url":"https://api.github.com/repos/cmft/taurus/commits{/sha}","git_commits_url":"https://api.github.com/repos/cmft/taurus/git/commits{/sha}","comments_url":"https://api.github.com/repos/cmft/taurus/comments{/number}","issue_comment_url":"https://api.github.com/repos/cmft/taurus/issues/comments{/number}","contents_url":"https://api.github.com/repos/cmft/taurus/contents/{+path}","compare_url":"https://api.github.com/repos/cmft/taurus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cmft/taurus/merges","archive_url":"https://api.github.com/repos/cmft/taurus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cmft/taurus/downloads","issues_url":"https://api.github.com/repos/cmft/taurus/issues{/number}","pulls_url":"https://api.github.com/repos/cmft/taurus/pulls{/number}","milestones_url":"https://api.github.com/repos/cmft/taurus/milestones{/number}","notifications_url":"https://api.github.com/repos/cmft/taurus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cmft/taurus/labels{/name}","releases_url":"https://api.github.com/repos/cmft/taurus/releases{/id}","deployments_url":"https://api.github.com/repos/cmft/taurus/deployments","created_at":"2016-10-27T07:01:33Z","updated_at":"2016-10-27T07:01:41Z","pushed_at":"2018-06-29T07:06:19Z","git_url":"git://github.com/cmft/taurus.git","ssh_url":"git@github.com:cmft/taurus.git","clone_url":"https://github.com/cmft/taurus.git","svn_url":"https://github.com/cmft/taurus","homepage":null,"size":49033,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":2,"watchers":0,"default_branch":"develop"}},"base":{"label":"taurus-org:develop","ref":"develop","sha":"3920e017c92bf9df4e6a3740c957373fb41d8338","user":{"login":"taurus-org","id":22969734,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyOTY5NzM0","avatar_url":"https://avatars1.githubusercontent.com/u/22969734?v=4","gravatar_id":"","url":"https://api.github.com/users/taurus-org","html_url":"https://github.com/taurus-org","followers_url":"https://api.github.com/users/taurus-org/followers","following_url":"https://api.github.com/users/taurus-org/following{/other_user}","gists_url":"https://api.github.com/users/taurus-org/gists{/gist_id}","starred_url":"https://api.github.com/users/taurus-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taurus-org/subscriptions","organizations_url":"https://api.github.com/users/taurus-org/orgs","repos_url":"https://api.github.com/users/taurus-org/repos","events_url":"https://api.github.com/users/taurus-org/events{/privacy}","received_events_url":"https://api.github.com/users/taurus-org/received_events","type":"Organization","site_admin":false},"repo":{"id":71514059,"node_id":"MDEwOlJlcG9zaXRvcnk3MTUxNDA1OQ==","name":"taurus","full_name":"taurus-org/taurus","owner":{"login":"taurus-org","id":22969734,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyOTY5NzM0","avatar_url":"https://avatars1.githubusercontent.com/u/22969734?v=4","gravatar_id":"","url":"https://api.github.com/users/taurus-org","html_url":"https://github.com/taurus-org","followers_url":"https://api.github.com/users/taurus-org/followers","following_url":"https://api.github.com/users/taurus-org/following{/other_user}","gists_url":"https://api.github.com/users/taurus-org/gists{/gist_id}","starred_url":"https://api.github.com/users/taurus-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taurus-org/subscriptions","organizations_url":"https://api.github.com/users/taurus-org/orgs","repos_url":"https://api.github.com/users/taurus-org/repos","events_url":"https://api.github.com/users/taurus-org/events{/privacy}","received_events_url":"https://api.github.com/users/taurus-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/taurus-org/taurus","description":"Official repository for taurus (control and data acquisition module python module)","fork":false,"url":"https://api.github.com/repos/taurus-org/taurus","forks_url":"https://api.github.com/repos/taurus-org/taurus/forks","keys_url":"https://api.github.com/repos/taurus-org/taurus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/taurus-org/taurus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/taurus-org/taurus/teams","hooks_url":"https://api.github.com/repos/taurus-org/taurus/hooks","issue_events_url":"https://api.github.com/repos/taurus-org/taurus/issues/events{/number}","events_url":"https://api.github.com/repos/taurus-org/taurus/events","assignees_url":"https://api.github.com/repos/taurus-org/taurus/assignees{/user}","branches_url":"https://api.github.com/repos/taurus-org/taurus/branches{/branch}","tags_url":"https://api.github.com/repos/taurus-org/taurus/tags","blobs_url":"https://api.github.com/repos/taurus-org/taurus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/taurus-org/taurus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/taurus-org/taurus/git/refs{/sha}","trees_url":"https://api.github.com/repos/taurus-org/taurus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/taurus-org/taurus/statuses/{sha}","languages_url":"https://api.github.com/repos/taurus-org/taurus/languages","stargazers_url":"https://api.github.com/repos/taurus-org/taurus/stargazers","contributors_url":"https://api.github.com/repos/taurus-org/taurus/contributors","subscribers_url":"https://api.github.com/repos/taurus-org/taurus/subscribers","subscription_url":"https://api.github.com/repos/taurus-org/taurus/subscription","commits_url":"https://api.github.com/repos/taurus-org/taurus/commits{/sha}","git_commits_url":"https://api.github.com/repos/taurus-org/taurus/git/commits{/sha}","comments_url":"https://api.github.com/repos/taurus-org/taurus/comments{/number}","issue_comment_url":"https://api.github.com/repos/taurus-org/taurus/issues/comments{/number}","contents_url":"https://api.github.com/repos/taurus-org/taurus/contents/{+path}","compare_url":"https://api.github.com/repos/taurus-org/taurus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/taurus-org/taurus/merges","archive_url":"https://api.github.com/repos/taurus-org/taurus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/taurus-org/taurus/downloads","issues_url":"https://api.github.com/repos/taurus-org/taurus/issues{/number}","pulls_url":"https://api.github.com/repos/taurus-org/taurus/pulls{/number}","milestones_url":"https://api.github.com/repos/taurus-org/taurus/milestones{/number}","notifications_url":"https://api.github.com/repos/taurus-org/taurus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/taurus-org/taurus/labels{/name}","releases_url":"https://api.github.com/repos/taurus-org/taurus/releases{/id}","deployments_url":"https://api.github.com/repos/taurus-org/taurus/deployments","created_at":"2016-10-21T00:02:05Z","updated_at":"2018-06-27T07:33:13Z","pushed_at":"2018-06-29T10:28:38Z","git_url":"git://github.com/taurus-org/taurus.git","ssh_url":"git@github.com:taurus-org/taurus.git","clone_url":"https://github.com/taurus-org/taurus.git","svn_url":"https://github.com/taurus-org/taurus","homepage":"http://taurus-scada.org","size":48960,"stargazers_count":20,"watchers_count":20,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":36,"mirror_url":null,"archived":false,"open_issues_count":158,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":36,"open_issues":158,"watchers":20,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/taurus-org/taurus/pulls/738"},"html":{"href":"https://github.com/taurus-org/taurus/pull/738"},"issue":{"href":"https://api.github.com/repos/taurus-org/taurus/issues/738"},"comments":{"href":"https://api.github.com/repos/taurus-org/taurus/issues/738/comments"},"review_comments":{"href":"https://api.github.com/repos/taurus-org/taurus/pulls/738/comments"},"review_comment":{"href":"https://api.github.com/repos/taurus-org/taurus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/taurus-org/taurus/pulls/738/commits"},"statuses":{"href":"https://api.github.com/repos/taurus-org/taurus/statuses/bf5bc1ad9ef647df8dc908e1353e32d4045cc7b8"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"cpascual"}}