prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <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)
  
  </issue>
  <code>
  [start of src/fal/cli/cli.py]
  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 of src/fal/cli/cli.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: 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
  
verification_info: {"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"}]}