prefect.cli.global_concurrency_limit

Functions

list_global_concurrency_limits

list_global_concurrency_limits()
List all global concurrency limits.

inspect_global_concurrency_limit

inspect_global_concurrency_limit(name: str = typer.Argument(..., help='The name of the global concurrency limit to inspect.'), output: Optional[str] = typer.Option(None, '--output', '-o', help='Specify an output format. Currently supports: json'), file_path: Optional[Path] = typer.Option(None, '--file', '-f', help='Path to .json file to write the global concurrency limit output to.'))
Inspect a global concurrency limit. Args:
  • name: The name of the global concurrency limit to inspect.
  • output: An output format for the command. Currently only supports JSON. Required if —file/-f is set.
  • file_path: A path to .json file to write the global concurrent limit output to.
Returns:
  • The ID of the global concurrency limit.
  • The created date of the global concurrency limit.
  • The updated date of the global concurrency limit.
  • The name of the global concurrency limit.
  • The limit of the global concurrency limit.
  • The number of active slots.
  • The slot decay per second.

delete_global_concurrency_limit

delete_global_concurrency_limit(name: str = typer.Argument(..., help='The name of the global concurrency limit to delete.'))
Delete a global concurrency limit. Args:
  • name: The name of the global concurrency limit to delete.

enable_global_concurrency_limit

enable_global_concurrency_limit(name: str = typer.Argument(..., help='The name of the global concurrency limit to enable.'))
Enable a global concurrency limit. Args:
  • name: The name of the global concurrency limit to enable.

disable_global_concurrency_limit

disable_global_concurrency_limit(name: str = typer.Argument(..., help='The name of the global concurrency limit to disable.'))
Disable a global concurrency limit. Args:
  • name: The name of the global concurrency limit to disable.

update_global_concurrency_limit

update_global_concurrency_limit(name: str = typer.Argument(..., help='The name of the global concurrency limit to update.'), enable: Optional[bool] = typer.Option(None, '--enable', help='Enable the global concurrency limit.'), disable: Optional[bool] = typer.Option(None, '--disable', help='Disable the global concurrency limit.'), limit: Optional[int] = typer.Option(None, '--limit', '-l', help='The limit of the global concurrency limit.'), active_slots: Optional[int] = typer.Option(None, '--active-slots', help='The number of active slots.'), slot_decay_per_second: Optional[float] = typer.Option(None, '--slot-decay-per-second', help='The slot decay per second.'))
Update a global concurrency limit. Args:
  • name: The name of the global concurrency limit to update.
  • enable: Enable the global concurrency limit.
  • disable: Disable the global concurrency limit.
  • limit: The limit of the global concurrency limit.
  • active_slots: The number of active slots.
  • slot_decay_per_second: The slot decay per second.
Examples: prefectglobalconcurrencylimitupdatemygcllimit10prefect global-concurrency-limit update my-gcl --limit 10 prefect gcl update my-gcl —active-slots 5 prefectgclupdatemygclslotdecaypersecond0.5prefect gcl update my-gcl --slot-decay-per-second 0.5 prefect gcl update my-gcl —enable $ prefect gcl update my-gcl —disable —limit 5

create_global_concurrency_limit

create_global_concurrency_limit(name: str = typer.Argument(..., help='The name of the global concurrency limit to create.'), limit: int = typer.Option(..., '--limit', '-l', help='The limit of the global concurrency limit.'), disable: Optional[bool] = typer.Option(None, '--disable', help='Create an inactive global concurrency limit.'), active_slots: Optional[int] = typer.Option(0, '--active-slots', help='The number of active slots.'), slot_decay_per_second: Optional[float] = typer.Option(0.0, '--slot-decay-per-second', help='The slot decay per second.'))
Create a global concurrency limit. Arguments: name (str): The name of the global concurrency limit to create. limit (int): The limit of the global concurrency limit. disable (Optional[bool]): Create an inactive global concurrency limit. active_slots (Optional[int]): The number of active slots. slot_decay_per_second (Optional[float]): The slot decay per second. Examples: $ prefect global-concurrency-limit create my-gcl —limit 10 $ prefect gcl create my-gcl —limit 5 —active-slots 3 $ prefect gcl create my-gcl —limit 5 —active-slots 3 —slot-decay-per-second 0.5 $ prefect gcl create my-gcl —limit 5 —inactive