prefect.cli.worker
start(worker_name=typer.Option(None, '-n', '--name', help='The name to give to the started worker. If not provided, a unique name will be generated.'), work_pool_name=typer.Option(..., '-p', '--pool', help='The work pool the started worker should poll.', prompt=True), work_queues=typer.Option(None, '-q', '--work-queue', help='One or more work queue names for the worker to pull from. If not provided, the worker will pull from all work queues in the work pool.'), worker_type=typer.Option(None, '-t', '--type', help='The type of worker to start. If not provided, the worker type will be inferred from the work pool.'), prefetch_seconds=SettingsOption(PREFECT_WORKER_PREFETCH_SECONDS, help='Number of seconds to look into the future for scheduled flow runs.'), run_once=typer.Option(False, help='Only run worker polling once. By default, the worker runs forever.'), limit=typer.Option(None, '-l', '--limit', help='Maximum number of flow runs to start simultaneously.'), with_healthcheck=typer.Option(False, help='Start a healthcheck server for the worker.'), install_policy=typer.Option(InstallPolicy.PROMPT.value, '--install-policy', help='Install policy to use workers from Prefect integration packages.', case_sensitive=False), base_job_template=typer.Option(None, '--base-job-template', help='The path to a JSON file containing the base job template to use. If unspecified, Prefect will use the default base job template for the given worker type. If the work pool already exists, this will be ignored.'))
async
Start a worker process to poll a work pool for flow runs.
Source code in src/prefect/cli/worker.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
|