{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/50775","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/50775/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/50775/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/50775/events","html_url":"https://github.com/saltstack/salt/issues/50775","id":388316933,"node_id":"MDU6SXNzdWUzODgzMTY5MzM=","number":50775,"title":"Question about asynchronous nature of the Reactor","user":{"login":"crux-capacitor","id":18069703,"node_id":"MDQ6VXNlcjE4MDY5NzAz","avatar_url":"https://avatars1.githubusercontent.com/u/18069703?v=4","gravatar_id":"","url":"https://api.github.com/users/crux-capacitor","html_url":"https://github.com/crux-capacitor","followers_url":"https://api.github.com/users/crux-capacitor/followers","following_url":"https://api.github.com/users/crux-capacitor/following{/other_user}","gists_url":"https://api.github.com/users/crux-capacitor/gists{/gist_id}","starred_url":"https://api.github.com/users/crux-capacitor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crux-capacitor/subscriptions","organizations_url":"https://api.github.com/users/crux-capacitor/orgs","repos_url":"https://api.github.com/users/crux-capacitor/repos","events_url":"https://api.github.com/users/crux-capacitor/events{/privacy}","received_events_url":"https://api.github.com/users/crux-capacitor/received_events","type":"User","site_admin":false},"labels":[{"id":77737132,"node_id":"MDU6TGFiZWw3NzczNzEzMg==","url":"https://api.github.com/repos/saltstack/salt/labels/Pending%20Discussion","name":"Pending Discussion","color":"c7def8","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/37","html_url":"https://github.com/saltstack/salt/milestone/37","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/37/labels","id":343741,"node_id":"MDk6TWlsZXN0b25lMzQzNzQx","number":37,"title":"Blocked","description":"Issues which are blocked in some way, whether they need further discussion, clarification, justification, or are blocked for some other reason.","creator":{"login":"basepi","id":702318,"node_id":"MDQ6VXNlcjcwMjMxOA==","avatar_url":"https://avatars2.githubusercontent.com/u/702318?v=4","gravatar_id":"","url":"https://api.github.com/users/basepi","html_url":"https://github.com/basepi","followers_url":"https://api.github.com/users/basepi/followers","following_url":"https://api.github.com/users/basepi/following{/other_user}","gists_url":"https://api.github.com/users/basepi/gists{/gist_id}","starred_url":"https://api.github.com/users/basepi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basepi/subscriptions","organizations_url":"https://api.github.com/users/basepi/orgs","repos_url":"https://api.github.com/users/basepi/repos","events_url":"https://api.github.com/users/basepi/events{/privacy}","received_events_url":"https://api.github.com/users/basepi/received_events","type":"User","site_admin":false},"open_issues":792,"closed_issues":2965,"state":"open","created_at":"2013-05-28T22:24:12Z","updated_at":"2018-12-12T20:52:17Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2018-12-06T17:24:07Z","updated_at":"2018-12-13T15:43:49Z","closed_at":null,"author_association":"NONE","body":"### Description of Issue/Question\r\n\r\nI'm hoping to get some clarification on the asynchronous nature of the reactor.\r\n\r\nIf I have a reactor start a long-running orchestration job, does that reactor thread wait for the job it created to finish before returning back to the thread pool, or does it immediately go back after the job starts? \r\n\r\nI want to make sure that the threads do not wait for the job to finish. Do I need to set 'async: True' in the reactor SLS to accomplish this, or does it do that by default?\r\n\r\n-------------------------------------------------------------------------------\r\n\r\nExample Reactor SLS:\r\n\r\nAre these 2 reactors functionally equivalent? If not, what is accomplished by setting 'async: True'?\r\n\r\n```\r\n\"Long Orchestration - Async True\":\r\n  runner.state.orchestrate:\r\n    - args:\r\n      - mods: orchestrate.job\r\n      - pillar:\r\n          id: {{ node }}\r\n    -  async: True\r\n```\r\n\r\n```\r\n\"Long Orchestration\":\r\n  runner.state.orchestrate:\r\n    - args:\r\n      - mods: orchestrate.job\r\n      - pillar:\r\n          id: {{ node }}\r\n```\r\n\r\nA couple follow up questions:\r\n\r\n1. Should 'async: True' be under the args dictionary?\r\n2. If I have 2 reactors defined under one event tag, will that use 2 threads, or just 1 to handle both reactors?"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/447014991","html_url":"https://github.com/saltstack/salt/issues/50775#issuecomment-447014991","issue_url":"https://api.github.com/repos/saltstack/salt/issues/50775","id":447014991,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NzAxNDk5MQ==","user":{"login":"crux-capacitor","id":18069703,"node_id":"MDQ6VXNlcjE4MDY5NzAz","avatar_url":"https://avatars1.githubusercontent.com/u/18069703?v=4","gravatar_id":"","url":"https://api.github.com/users/crux-capacitor","html_url":"https://github.com/crux-capacitor","followers_url":"https://api.github.com/users/crux-capacitor/followers","following_url":"https://api.github.com/users/crux-capacitor/following{/other_user}","gists_url":"https://api.github.com/users/crux-capacitor/gists{/gist_id}","starred_url":"https://api.github.com/users/crux-capacitor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crux-capacitor/subscriptions","organizations_url":"https://api.github.com/users/crux-capacitor/orgs","repos_url":"https://api.github.com/users/crux-capacitor/repos","events_url":"https://api.github.com/users/crux-capacitor/events{/privacy}","received_events_url":"https://api.github.com/users/crux-capacitor/received_events","type":"User","site_admin":false},"created_at":"2018-12-13T15:43:49Z","updated_at":"2018-12-13T15:43:49Z","author_association":"NONE","body":"@DmitryKuzmenko \r\n\r\nThanks. Last question - is there a way to make the thread immediately return to the thread pool after it starts the job? So that it does not wait for the job to complete?"}}
{"actor":{"display_login":"crux-capacitor"}}