Repository: dbt-labs/dbt-core

Issue:
`dbt ls` causes `dbt deps` to fail
### Describe the bug
Once you run `dbt ls` the following `dbt deps` commands will fail

### Steps To Reproduce
```# start the server
dbt rpc

# send a list request
curl -X POST http://localhost:8580/jsonrpc -d '{"jsonrpc": "2.0", "method": "list", "id": "1", "params": {"select": "debug"}}' -H 'Content-Type: application/json'

# send a deps request
curl -X POST http://localhost:8580/jsonrpc -d '{"jsonrpc": "2.0", "method": "deps", "id": "1"}' -H 'Content-Type: application/json'
```

### Expected behavior
A successful `dbt deps` run

### Screenshots and log output
Currently `dbt deps` returns
```
{"error": {"code": -32000, "message": "Server error", "data": {"type": "ValueError", "args": ["signal only works in main thread of the main interpreter"], "message": "signal only works in main thread of the main interpreter"}}, "id": "1", "jsonrpc": "2.0"}
```

Stack trace:
```
  File "/Users/kwigley/workspace/dbt/env/lib/python3.8/site-packages/jsonrpc/manager.py", line 113, in _get_responses
    result = method(*request.args, **request.kwargs)
  File "/Users/kwigley/workspace/dbt/core/dbt/rpc/task_handler.py", line 511, in __call__
    return self.handle(kwargs)
  File "/Users/kwigley/workspace/dbt/core/dbt/rpc/task_handler.py", line 503, in handle
    return self.handle_singlethreaded(kwargs, flags)
  File "/Users/kwigley/workspace/dbt/core/dbt/rpc/task_handler.py", line 427, in handle_singlethreaded
    self.process.task_exec()
  File "/Users/kwigley/workspace/dbt/core/dbt/rpc/task_handler.py", line 84, in task_exec
    signal.signal(signal.SIGTERM, sigterm_handler)
  File "/Users/kwigley/.asdf/installs/python/3.8.11/lib/python3.8/signal.py", line 47, in signal
    handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
ValueError: signal only works in main thread
```

### System information
**Which database are you using dbt with?**
- [ ] postgres
- [ ] redshift
- [ ] bigquery
- [ ] snowflake
- [ ] other (specify: ____________)


**The output of `dbt --version`:**
```
<output goes here>
```

**The operating system you're using:**

**The output of `python --version`:**

### Additional context
Add any other context about the problem here.



Discussion:

Resolving patch:
diff --git a/core/dbt/task/list.py b/core/dbt/task/list.py
--- a/core/dbt/task/list.py
+++ b/core/dbt/task/list.py
@@ -44,7 +44,6 @@ class ListTask(GraphRunnableTask):
 
     def __init__(self, args, config):
         super().__init__(args, config)
-        self.args.single_threaded = True
         if self.args.models:
             if self.args.select:
                 raise RuntimeException(
diff --git a/core/dbt/task/rpc/project_commands.py b/core/dbt/task/rpc/project_commands.py
--- a/core/dbt/task/rpc/project_commands.py
+++ b/core/dbt/task/rpc/project_commands.py
@@ -271,13 +271,13 @@ class RemoteListTask(
     METHOD_NAME = 'list'
 
     def set_args(self, params: RPCListParameters) -> None:
-
         self.args.output = params.output
         self.args.resource_types = self._listify(params.resource_types)
         self.args.models = self._listify(params.models)
         self.args.exclude = self._listify(params.exclude)
         self.args.selector_name = params.selector
         self.args.select = self._listify(params.select)
+        self.args.single_threaded = True
 
         if self.args.models:
             if self.args.select:


Test patch: