We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Bug] Too many messages received before initialization
> mmeasic: Hey, I get this log message on dbt version 0.21.0:

```Logged from file /Users/mmeasic/.virtualenvs/bi-etl-dbt/lib/python3.8/site-packages/dbt/parser/manifest.py, line 792
Traceback (most recent call last):
  File "/Users/mmeasic/.virtualenvs/bi-etl-dbt/lib/python3.8/site-packages/logbook/handlers.py", line 216, in handle
    self.emit(record)
  File "/Users/mmeasic/.virtualenvs/bi-etl-dbt/lib/python3.8/site-packages/dbt/logger.py", line 478, in emit
    assert len(self._msg_buffer) < self._bufmax, \
AssertionError: too many messages received before initilization!
```

*****

> jstrom40: did your job run after it gave you this error message? i have had this problem when i have had too many threads set up in dbt. i also had it when i tried to run the fal tool but my actual job still ran after it popped out this message

*****

> mmeasic: It did run.
> I actually have 4 threads set for the target

[Thread link](https://discord.com/channels/908693336280432750/908693336280432755/930791100803850283)

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `src/fal/cli/cli.py`
Content:
```
1 from typing import List
2 import sys
3 from dbt.logger import log_manager, GLOBAL_LOGGER as logger
4 from fal.cli.flow_runner import fal_flow_run
5 from faldbt.lib import DBT_VCURRENT, DBT_V1
6 from .args import parse_args
7 from .fal_runner import fal_run
8 from fal.telemetry import telemetry
9 
10 
11 @telemetry.log_call("cli")
12 def cli(argv: List[str] = sys.argv):
13     parsed = parse_args(argv[1:])
14 
15     # TODO: remove `action="extend"` to match exactly what dbt does
16     selects_count = (
17         argv.count("-s")
18         + argv.count("--select")
19         + argv.count("-m")
20         + argv.count("--model")
21     )
22     exclude_count = argv.count("--exclude")
23     script_count = argv.count("--script")
24 
25     if parsed.disable_logging:
26         logger.disable()
27     # Re-enable logging for 1.0.0 through old API of logger
28     elif DBT_VCURRENT.compare(DBT_V1) >= 0:
29         if logger.disabled:
30             logger.enable()
31 
32     with log_manager.applicationbound():
33         if parsed.debug:
34             log_manager.set_debug()
35 
36         if parsed.command == "flow":
37             if parsed.flow_command == "run":
38                 fal_flow_run(parsed)
39 
40         elif parsed.command == "run":
41             fal_run(
42                 parsed,
43                 selects_count=selects_count,
44                 exclude_count=exclude_count,
45                 script_count=script_count,
46             )
47
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/src/fal/cli/cli.py b/src/fal/cli/cli.py
--- a/src/fal/cli/cli.py
+++ b/src/fal/cli/cli.py
@@ -20,6 +20,10 @@
     exclude_count = argv.count("--exclude")
     script_count = argv.count("--script")
 
+    # Disabling the dbt.logger.DelayedFileHandler manually
+    # since we do not use the new dbt logging system
+    # This fixes issue https://github.com/fal-ai/fal/issues/97
+    log_manager.set_path(None)
     if parsed.disable_logging:
         logger.disable()
     # Re-enable logging for 1.0.0 through old API of logger

{"golden_diff": "diff --git a/src/fal/cli/cli.py b/src/fal/cli/cli.py\n--- a/src/fal/cli/cli.py\n+++ b/src/fal/cli/cli.py\n@@ -20,6 +20,10 @@\n     exclude_count = argv.count(\"--exclude\")\n     script_count = argv.count(\"--script\")\n \n+    # Disabling the dbt.logger.DelayedFileHandler manually\n+    # since we do not use the new dbt logging system\n+    # This fixes issue https://github.com/fal-ai/fal/issues/97\n+    log_manager.set_path(None)\n     if parsed.disable_logging:\n         logger.disable()\n     # Re-enable logging for 1.0.0 through old API of logger\n", "issue": "[Bug] Too many messages received before initialization\n> mmeasic: Hey, I get this log message on dbt version 0.21.0:\r\n\r\n```Logged from file /Users/mmeasic/.virtualenvs/bi-etl-dbt/lib/python3.8/site-packages/dbt/parser/manifest.py, line 792\r\nTraceback (most recent call last):\r\n  File \"/Users/mmeasic/.virtualenvs/bi-etl-dbt/lib/python3.8/site-packages/logbook/handlers.py\", line 216, in handle\r\n    self.emit(record)\r\n  File \"/Users/mmeasic/.virtualenvs/bi-etl-dbt/lib/python3.8/site-packages/dbt/logger.py\", line 478, in emit\r\n    assert len(self._msg_buffer) < self._bufmax, \\\r\nAssertionError: too many messages received before initilization!\r\n```\r\n\r\n*****\r\n\r\n> jstrom40: did your job run after it gave you this error message? i have had this problem when i have had too many threads set up in dbt. i also had it when i tried to run the fal tool but my actual job still ran after it popped out this message\r\n\r\n*****\r\n\r\n> mmeasic: It did run.\r\n> I actually have 4 threads set for the target\r\n\r\n[Thread link](https://discord.com/channels/908693336280432750/908693336280432755/930791100803850283)\n", "before_files": [{"content": "from typing import List\nimport sys\nfrom dbt.logger import log_manager, GLOBAL_LOGGER as logger\nfrom fal.cli.flow_runner import fal_flow_run\nfrom faldbt.lib import DBT_VCURRENT, DBT_V1\nfrom .args import parse_args\nfrom .fal_runner import fal_run\nfrom fal.telemetry import telemetry\n\n\n@telemetry.log_call(\"cli\")\ndef cli(argv: List[str] = sys.argv):\n    parsed = parse_args(argv[1:])\n\n    # TODO: remove `action=\"extend\"` to match exactly what dbt does\n    selects_count = (\n        argv.count(\"-s\")\n        + argv.count(\"--select\")\n        + argv.count(\"-m\")\n        + argv.count(\"--model\")\n    )\n    exclude_count = argv.count(\"--exclude\")\n    script_count = argv.count(\"--script\")\n\n    if parsed.disable_logging:\n        logger.disable()\n    # Re-enable logging for 1.0.0 through old API of logger\n    elif DBT_VCURRENT.compare(DBT_V1) >= 0:\n        if logger.disabled:\n            logger.enable()\n\n    with log_manager.applicationbound():\n        if parsed.debug:\n            log_manager.set_debug()\n\n        if parsed.command == \"flow\":\n            if parsed.flow_command == \"run\":\n                fal_flow_run(parsed)\n\n        elif parsed.command == \"run\":\n            fal_run(\n                parsed,\n                selects_count=selects_count,\n                exclude_count=exclude_count,\n                script_count=script_count,\n            )\n", "path": "src/fal/cli/cli.py"}], "after_files": [{"content": "from typing import List\nimport sys\nfrom dbt.logger import log_manager, GLOBAL_LOGGER as logger\nfrom fal.cli.flow_runner import fal_flow_run\nfrom faldbt.lib import DBT_VCURRENT, DBT_V1\nfrom .args import parse_args\nfrom .fal_runner import fal_run\n\n\ndef cli(argv: List[str] = sys.argv):\n    parsed = parse_args(argv[1:])\n\n    # TODO: remove `action=\"extend\"` to match exactly what dbt does\n    selects_count = (\n        argv.count(\"-s\")\n        + argv.count(\"--select\")\n        + argv.count(\"-m\")\n        + argv.count(\"--model\")\n    )\n    exclude_count = argv.count(\"--exclude\")\n    script_count = argv.count(\"--script\")\n\n    # Disabling the dbt.logger.DelayedFileHandler manually\n    # since we do not use the new dbt logging system\n    # This fixes issue https://github.com/fal-ai/fal/issues/97\n    log_manager.set_path(None)\n    if parsed.disable_logging:\n        logger.disable()\n    # Re-enable logging for 1.0.0 through old API of logger\n    elif DBT_VCURRENT.compare(DBT_V1) >= 0:\n        if logger.disabled:\n            logger.enable()\n\n    with log_manager.applicationbound():\n        if parsed.debug:\n            log_manager.set_debug()\n\n        if parsed.command == \"flow\":\n            if parsed.flow_command == \"run\":\n                fal_flow_run(parsed)\n\n        elif parsed.command == \"run\":\n            fal_run(\n                parsed,\n                selects_count=selects_count,\n                exclude_count=exclude_count,\n                script_count=script_count,\n            )\n", "path": "src/fal/cli/cli.py"}]}