Worker
worker
engine
Engine
Bases: ABC
Source code in src/qgis_server_light/worker/engine.py
31 32 33 34 35 36 37 38 39 40 41 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 | |
available_job_info_classes: dict[str, type[QslJobInfoParameter]] = {}
instance-attribute
available_runner_classes: dict[str, type[Runner]] = {}
instance-attribute
available_runner_classes_by_job_info: dict[str, type[Runner]] = {}
instance-attribute
context = context
instance-attribute
info = self._initialize_infos()
instance-attribute
layer_cache = LayerCache()
instance-attribute
qgis = Qgis(svg_paths, log_level)
instance-attribute
status
property
__del__()
Source code in src/qgis_server_light/worker/engine.py
51 52 | |
__init__(context: EngineContext, runner_plugins: list[str], svg_paths: list[str] | None = None, log_level=logging.WARNING)
Source code in src/qgis_server_light/worker/engine.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | |
process(job_info: QslJobInfoParameter, feedback: QgsProcessingFeedback | None = None) -> JobResult
Hands the job to the runner which is responsible for it.
Every runner gets its own copy of the context, so a runner can't change what the next job sees.
Parameters:
-
job_info(QslJobInfoParameter) –The job to solve.
-
feedback(QgsProcessingFeedback | None, default:None) –The feedback the job reports its progress to and is canceled through,
Noneif nobody listens.
Returns:
-
JobResult–The result the runner produced.
Source code in src/qgis_server_light/worker/engine.py
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 | |
runner_plugin_by_job_info(job_info: QslJobInfoParameter) -> type[Runner]
Here we decide which plugin we load dynamically out of the available ones.
Parameters:
-
job_info(QslJobInfoParameter) –Is the parameter instance we check the available worker classes and there the job_info_class at each.
Returns:
-
type[Runner]–The selected runner class
Source code in src/qgis_server_light/worker/engine.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | |
set_crashed()
Source code in src/qgis_server_light/worker/engine.py
158 159 | |
set_processing()
Source code in src/qgis_server_light/worker/engine.py
161 162 | |
set_waiting()
Source code in src/qgis_server_light/worker/engine.py
155 156 | |
EngineContext
dataclass
Bases: JobContext
The engine hands its context on to every job, so it carries exactly the
attributes of JobContext. A new attribute is therefore added in one place only.
Source code in src/qgis_server_light/worker/engine.py
24 25 26 27 28 | |
__init__(base_path: str | Path, process_allowlist: list[str] = list(), process_output_dir: str | Path | None = None, process_internal_allowlist: list[str] = list(), process_timeout: float | None = None, process_max_output_size: int | None = None, process_max_features: int | None = None, feedback: QgsProcessingFeedback | None = None) -> None
image_utils
job_guard
JobDismissedError
Bases: Exception
The job was dismissed while it ran.
Source code in src/qgis_server_light/worker/job_guard.py
11 12 | |
JobGuard
Watches a running process job from its own thread, the algorithm blocks the
thread of the worker. Once the job is dismissed, runs longer than timeout or its
outputs grow beyond max_output_size, the guard cancels the feedback of the job.
QGIS algorithms check it and stop. Native code which doesn't check it would keep the
worker busy forever, so if the job doesn't stop within cancel_grace the guard
abandons it and ends the worker process the hard way, its restart brings it back.
Used as context manager around the job, it hands out the feedback the job runs with and turns the error of a job it canceled into the reason it canceled it.
Attributes:
-
check_interval(float) –Seconds between two looks at the job.
-
cancel_grace(float) –Seconds a canceled job has to stop before the worker exits.
Source code in src/qgis_server_light/worker/job_guard.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 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 | |
abandon = abandon
instance-attribute
cancel_grace: float = 30.0
class-attribute
instance-attribute
check_interval: float = 1.0
class-attribute
instance-attribute
dismissed = dismissed
instance-attribute
feedback = feedback
instance-attribute
finished = threading.Event()
instance-attribute
max_output_size = max_output_size
instance-attribute
output_dir = output_dir
instance-attribute
reason: Exception | None = None
instance-attribute
thread = threading.Thread(target=(self.watch), name='job-guard', daemon=True)
instance-attribute
timeout = timeout
instance-attribute
__enter__() -> QgsProcessingFeedback
Starts the clock of the timeout and the watch.
Returns:
-
QgsProcessingFeedback–The feedback the job has to run with, it is the line the guard pulls on.
Source code in src/qgis_server_light/worker/job_guard.py
68 69 70 71 72 73 74 75 76 | |
__exit__(exc_type, exc, traceback)
Stops the watch once the job is over, however it ended. The error of a job the guard canceled tells little more than "canceled", so it is replaced by the reason, the original stays attached as cause.
Raises:
-
JobDismissedError–If the guard canceled the job because it was dismissed.
-
JobLimitExceededError–If the guard canceled the job because of a limit.
Source code in src/qgis_server_light/worker/job_guard.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | |
__init__(feedback: QgsProcessingFeedback, dismissed: Callable[[], bool], abandon: Callable[[Exception], None], timeout: float | None = None, output_dir: Path | None = None, max_output_size: int | None = None)
Parameters:
-
feedback(QgsProcessingFeedback) –The feedback the job runs with.
-
dismissed(Callable[[], bool]) –Tells if somebody dismissed the job.
-
abandon(Callable[[Exception], None]) –Finishes the job for good before the worker exits, it gets the reason the job was canceled for.
-
timeout(float | None, default:None) –Seconds the job may run,
Nonefor no limit. -
output_dir(Path | None, default:None) –The dir the job writes its outputs to.
-
max_output_size(int | None, default:None) –Bytes the job may write into
output_dir,Nonefor no limit.
Source code in src/qgis_server_light/worker/job_guard.py
38 39 40 41 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 | |
check() -> Exception | None
Looks at the job once.
Returns:
-
Exception | None–The reason to cancel the job,
Noneif it may go on.
Source code in src/qgis_server_light/worker/job_guard.py
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | |
output_size() -> int
The bytes the job has written so far.
Source code in src/qgis_server_light/worker/job_guard.py
137 138 139 140 141 142 143 144 145 146 147 148 149 | |
watch()
The loop of the guard thread: it looks at the job every check_interval
seconds until the job is over or there is a reason to cancel it. After the cancel
it gives the job cancel_grace seconds to stop, a job ignoring it is abandoned
together with the worker process.
Source code in src/qgis_server_light/worker/job_guard.py
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | |
JobLimitExceededError
Bases: Exception
The job ran too long or wrote too much.
Source code in src/qgis_server_light/worker/job_guard.py
15 16 | |
layer_cache
DEFAULT_TTL_SECONDS = 24 * 60 * 60
module-attribute
LayerCache
Bases: MutableMapping[str, QgsMapLayer]
Layers opened by the worker, shared by all jobs of the worker process.
Entries which were not used for longer than the TTL are evicted by
evict_expired. This bounds the growth caused by layers which are not
requested anymore (e.g. after a project was changed). It does not bound the
number of layers used within one TTL.
Not thread safe: only the thread processing the jobs may access it.
Source code in src/qgis_server_light/worker/layer_cache.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | |
ttl_seconds = ttl_seconds
instance-attribute
__contains__(cache_name: object) -> bool
Source code in src/qgis_server_light/worker/layer_cache.py
39 40 | |
__delitem__(cache_name: str) -> None
Source code in src/qgis_server_light/worker/layer_cache.py
35 36 37 | |
__getitem__(cache_name: str) -> QgsMapLayer
Source code in src/qgis_server_light/worker/layer_cache.py
26 27 28 29 | |
__init__(ttl_seconds: float = DEFAULT_TTL_SECONDS) -> None
Source code in src/qgis_server_light/worker/layer_cache.py
21 22 23 24 | |
__iter__() -> Iterator[str]
Source code in src/qgis_server_light/worker/layer_cache.py
42 43 | |
__len__() -> int
Source code in src/qgis_server_light/worker/layer_cache.py
45 46 | |
__setitem__(cache_name: str, layer: QgsMapLayer) -> None
Source code in src/qgis_server_light/worker/layer_cache.py
31 32 33 | |
evict_expired() -> int
Evicts all layers which were not used within the TTL.
Returns:
-
int–The number of evicted layers.
Source code in src/qgis_server_light/worker/layer_cache.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | |
qgis
CredentialsHelper
Bases: QgsCredentials
Source code in src/qgis_server_light/worker/qgis.py
8 9 10 11 12 13 14 15 16 17 18 | |
__init__()
Source code in src/qgis_server_light/worker/qgis.py
9 10 11 | |
request(realm, username, password, message)
Source code in src/qgis_server_light/worker/qgis.py
13 14 15 | |
requestMasterPassword(password, stored)
Source code in src/qgis_server_light/worker/qgis.py
17 18 | |
Qgis(svg_paths: list[str] | None, log_level)
Source code in src/qgis_server_light/worker/qgis.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | |
version() -> int
Source code in src/qgis_server_light/worker/qgis.py
46 47 | |
version_name() -> str
Source code in src/qgis_server_light/worker/qgis.py
50 51 | |
qgis_type_serializer
QDateConverter
Bases: Converter
Source code in src/qgis_server_light/worker/qgis_type_serializer.py
9 10 11 12 13 14 15 16 17 18 19 | |
format = 'yyyy-MM-dd'
class-attribute
instance-attribute
deserialize(value: str, **kwargs: Any) -> QDate
Source code in src/qgis_server_light/worker/qgis_type_serializer.py
12 13 | |
serialize(value: QDate, **kwargs: Any) -> str | None
Source code in src/qgis_server_light/worker/qgis_type_serializer.py
15 16 17 18 19 | |
QDateTimeConverter
Bases: Converter
Source code in src/qgis_server_light/worker/qgis_type_serializer.py
22 23 24 25 26 27 28 29 30 31 32 | |
format = Qt.DateFormat.ISODate
class-attribute
instance-attribute
deserialize(value: str, **kwargs: Any) -> QDateTime
Source code in src/qgis_server_light/worker/qgis_type_serializer.py
25 26 | |
serialize(value: QDateTime, **kwargs: Any) -> str | None
Source code in src/qgis_server_light/worker/qgis_type_serializer.py
28 29 30 31 32 | |
register_converters_at_runtime()
Source code in src/qgis_server_light/worker/qgis_type_serializer.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | |
redis
DEFAULT_DATA_ROOT = '/io/data'
module-attribute
DEFAULT_PROCESS_ALLOWLIST = ','.join(['native:buffer', 'native:centroids'])
module-attribute
DEFAULT_PROCESS_MAX_FEATURES = 1000000
module-attribute
DEFAULT_PROCESS_MAX_OUTPUT_SIZE = 1024
module-attribute
DEFAULT_PROCESS_OUTPUT_DIR = '/io/process_output'
module-attribute
DEFAULT_PROCESS_TIMEOUT = 3600
module-attribute
DEFAULT_RUNNER_PLUGINS = ':'.join(['qgis_server_light.worker.runner.render.RenderRunner', 'qgis_server_light.worker.runner.legend.GetLegendRunner', 'qgis_server_light.worker.runner.feature.GetFeatureRunner', 'qgis_server_light.worker.runner.crs.CrsRunner'])
module-attribute
DEFAULT_SVG_PATH = '/io/svg'
module-attribute
engine_classes: dict[str, type[RedisEngine]] = {'publish': RedisPublishEngine, 'state': RedisStateEngine}
module-attribute
JobProgress
Writes the progress a running job reports into its job hash. QGIS reports the progress per feature as float, so only a change of the full percentage is written, that's at most 101 writes per job.
Source code in src/qgis_server_light/worker/redis.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | |
client = client
instance-attribute
job_key = job_key
instance-attribute
percent: int | None = None
instance-attribute
progress_key = progress_key
instance-attribute
__call__(progress: float)
Source code in src/qgis_server_light/worker/redis.py
73 74 75 76 77 78 79 80 | |
__init__(client: Redis, job_key: str, progress_key: str)
Source code in src/qgis_server_light/worker/redis.py
67 68 69 70 71 | |
RedisEngine
Bases: Engine
The common part of the redis workers: connecting, registering, the heartbeat and the loop taking jobs from the queue. How a finished job is delivered is decided by the subclasses, so the loop does not need to know about it.
Attributes:
-
protocol(type[RedisProtocol]) –The protocol the engine is built on, it defines the queue the engine listens on.
Source code in src/qgis_server_light/worker/redis.py
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 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 | |
boot_start = time.time()
instance-attribute
heartbeat_interval = RedisProtocol.worker_heartbeat_interval
instance-attribute
heartbeat_thread = None
instance-attribute
info_expire: int = 300
instance-attribute
max_retries = 11
instance-attribute
once = once
instance-attribute
processes_json: str | None = None
instance-attribute
protocol: type[RedisProtocol]
instance-attribute
queue_name = self.protocol.queue_name()
instance-attribute
redis_client: Redis | None = None
instance-attribute
retry_wait = 0.01
instance-attribute
shutdown = False
instance-attribute
__init__(context: EngineContext, runner_plugins: list[str], svg_paths: list | None = None, once: bool = False) -> None
Source code in src/qgis_server_light/worker/redis.py
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | |
describe_processes()
Describes the processes the worker serves once on boot, the beats only pass the result on. Workers without the process runner don't serve processes and describe nothing.
Source code in src/qgis_server_light/worker/redis.py
237 238 239 240 241 242 243 244 245 246 247 248 249 | |
exit_connection_error()
staticmethod
Source code in src/qgis_server_light/worker/redis.py
126 127 128 129 | |
exit_gracefully(signum, frame)
Source code in src/qgis_server_light/worker/redis.py
131 132 133 134 135 136 | |
fail_job(job_id: str, job_info: QslJobInfoParameter | None, error: Exception, pipeline: Pipeline, start_time: float)
abstractmethod
Delivers the error of a job which failed, or was dismissed while it ran.
Parameters:
-
job_id(str) –The unique identifier of the job.
-
job_info(QslJobInfoParameter | None) –The job info of the job,
Noneif it failed before the job info could be read. -
error(Exception) –The error the job failed with.
-
pipeline(Pipeline) –The pipeline holding the transaction.
-
start_time(float) –The time the job was taken from the queue.
Source code in src/qgis_server_light/worker/redis.py
464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 | |
heartbeat(client: Redis) -> datetime.datetime
Tells redis that this worker is still alive. Each beat is the full advertisement: the worker info with its current status, the last seen timestamp, the renewed expiry and the id in the list of workers. The beat does not ask redis what it still knows, it simply writes everything again. So when redis lost its keys (restart, flush, eviction) the worker is back within one heartbeat interval, without anybody having to notice the loss. Only the process descriptions are too big for that, the beat asks for them and writes them when they are missing.
Parameters:
-
client(Redis) –The redis client.
Returns:
-
datetime–The UTC timestamp which was written as last seen.
Source code in src/qgis_server_light/worker/redis.py
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | |
job_guard(client: Redis, job_id: str, job_info: QslJobInfoParameter, start_time: float) -> AbstractContextManager[QgsProcessingFeedback | None]
What watches the job while it runs, it hands out the feedback the job reports its progress to and is canceled through.
Parameters:
-
client(Redis) –The redis client.
-
job_id(str) –The unique identifier of the job.
-
job_info(QslJobInfoParameter) –The job info of the job.
-
start_time(float) –The time the job was taken from the queue.
Returns:
-
AbstractContextManager[QgsProcessingFeedback | None]–The context manager around the job, giving the feedback,
Noneif nobody -
AbstractContextManager[QgsProcessingFeedback | None]–listens.
Source code in src/qgis_server_light/worker/redis.py
424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 | |
prune_vanished_workers(client: Redis)
staticmethod
Removes the ids of workers from the list whose hash expired already. Such a worker was killed or lost its container and could not say goodbye, so a starting colleague tidies up behind it.
Parameters:
-
client(Redis) –The redis client.
Source code in src/qgis_server_light/worker/redis.py
205 206 207 208 209 210 211 212 213 214 215 216 217 218 | |
register_worker(client: Redis)
Makes this worker known in redis and cleans up behind workers which vanished without unregistering. This way the list of workers heals itself with every worker start. The advertising itself is left to the first beat, there is only one place which knows what a worker writes.
Parameters:
-
client(Redis) –The redis client.
Source code in src/qgis_server_light/worker/redis.py
191 192 193 194 195 196 197 198 199 200 201 202 203 | |
report_crash(client: Redis)
Sets the status to crashed and tells redis right away. When redis is part of the trouble, the worker only logs that it couldn't report, the original error is the one which matters and must not be covered by a redis one.
Parameters:
-
client(Redis) –The redis client.
Source code in src/qgis_server_light/worker/redis.py
350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 | |
retry_connection(redis_url: str, count: int)
Source code in src/qgis_server_light/worker/redis.py
267 268 269 | |
retry_handling_with_jitter(count: int)
Source code in src/qgis_server_light/worker/redis.py
118 119 120 121 122 123 124 | |
run(redis_url)
Connects to redis, registers the worker, starts the heartbeat and serves jobs
until the worker is told to stop, or with once until it served one. If
something unexpected breaks the job loop, the worker reports its crash to redis
before it goes down with the very same error, so the logs still show what
happened. Exiting on purpose (a signal or giving up on redis) is not a crash.
Parameters:
-
redis_url–The url of redis, e.g.
redis://qsl-redis:6379.
Source code in src/qgis_server_light/worker/redis.py
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 | |
serve_jobs(r: Redis, p: Pipeline, redis_url: str)
The job loop: takes the next job from the queue, processes it and publishes
the result. A failing job is published as an error result, the loop goes on. A
dismissed job is delivered the same way, but only noted in the log, somebody
asked for it. With once the loop ends after the first job. When the connection
to redis is lost, the loop waits for it to come back and carries on, the
heartbeat thread takes care of advertising the worker again.
Parameters:
-
r(Redis) –The redis client.
-
p(Pipeline) –The pipeline the job status and the result are written with.
-
redis_url(str) –The url of redis, used when waiting for the connection.
Source code in src/qgis_server_light/worker/redis.py
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 | |
set_job_runtime_status(job_id: str, pipeline: Pipeline, status: str, start_time: float)
staticmethod
Source code in src/qgis_server_light/worker/redis.py
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | |
start(redis_url) -> Redis
Source code in src/qgis_server_light/worker/redis.py
271 272 273 274 275 276 | |
start_heartbeat_worker(client: Redis)
Creates an own thread which is responsible for renewing the heartbeat info of the worker in redis
Source code in src/qgis_server_light/worker/redis.py
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 | |
succeed_job(job_id: str, job_info: QslJobInfoParameter, result: JobResult, pipeline: Pipeline, start_time: float)
abstractmethod
Delivers the result of a job which was solved.
Parameters:
-
job_id(str) –The unique identifier of the job.
-
job_info(QslJobInfoParameter) –The job info of the job.
-
result(JobResult) –The result the runner returned.
-
pipeline(Pipeline) –The pipeline holding the transaction.
-
start_time(float) –The time the job was taken from the queue.
Source code in src/qgis_server_light/worker/redis.py
444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 | |
unregister_worker(client: Redis)
Removes this worker from redis on a graceful shutdown. If redis is gone already, the worker does not insist: its info expires and the next registering worker cleans the list.
Parameters:
-
client(Redis) –The redis client.
Source code in src/qgis_server_light/worker/redis.py
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | |
wait_for_connection(client: Redis, redis_url: str)
Pings redis until it answers, waiting a bit longer after each refused ping. It is used on start and whenever the job loop lost the connection. Each outage gets the full number of retries, a worker which survived many short hiccups should not give up on the next one just because it used them up already.
Parameters:
-
client(Redis) –The redis client.
-
redis_url(str) –The url of redis, only used to tell in the logs where the worker is knocking.
Source code in src/qgis_server_light/worker/redis.py
278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | |
write_missing_processes(client: Redis)
Writes the process descriptions into the hash of the worker when they are not there. The descriptions are too big to be written with every beat, so the beat only asks whether redis still knows them. After redis lost its keys they are back within one heartbeat interval like the rest of the worker.
Parameters:
-
client(Redis) –The redis client.
Source code in src/qgis_server_light/worker/redis.py
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 | |
RedisPublishEngine
Bases: RedisEngine
The engine publishing the result to the waiting dispatcher (see
RedisPublishProtocol). This is the default, map related jobs are served
by it.
Source code in src/qgis_server_light/worker/redis.py
486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 | |
protocol = RedisPublishProtocol
class-attribute
instance-attribute
fail_job(job_id: str, job_info: QslJobInfoParameter | None, error: Exception, pipeline: Pipeline, start_time: float)
Source code in src/qgis_server_light/worker/redis.py
527 528 529 530 531 532 533 534 535 536 537 | |
publish_result(job_id: str, result: JobResult, pipeline: Pipeline, status: str, start_time: float)
Sets the final status and publishes the pickled result. Success and failure only differ in the result and the status, so both end here.
Parameters:
-
job_id(str) –The unique identifier of the job.
-
result(JobResult) –The result to publish, the worker information is added.
-
pipeline(Pipeline) –The pipeline holding the transaction.
-
status(str) –The final status of the job.
-
start_time(float) –The time the job was taken from the queue.
Source code in src/qgis_server_light/worker/redis.py
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 | |
succeed_job(job_id: str, job_info: QslJobInfoParameter, result: JobResult, pipeline: Pipeline, start_time: float)
Source code in src/qgis_server_light/worker/redis.py
517 518 519 520 521 522 523 524 525 | |
RedisStateEngine
Bases: RedisEngine
The engine keeping the result in the job hash (see RedisStateProtocol).
Process-workers are started with it.
Source code in src/qgis_server_light/worker/redis.py
540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 | |
protocol = RedisStateProtocol
class-attribute
instance-attribute
abandon_job(client: Redis, job_id: str, job_info: QslJobInfoParameter, reason: Exception, start_time: float)
Finishes a job which didn't stop after it was canceled, right before the worker exits. It runs in the thread of the guard, the thread of the worker is still stuck in the algorithm, so it has its own pipeline.
Parameters:
-
client(Redis) –The redis client.
-
job_id(str) –The unique identifier of the job.
-
job_info(QslJobInfoParameter) –The job info of the job.
-
reason(Exception) –Why the job was canceled.
-
start_time(float) –The time the job was taken from the queue.
Source code in src/qgis_server_light/worker/redis.py
595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 | |
fail_job(job_id: str, job_info: QslJobInfoParameter | None, error: Exception, pipeline: Pipeline, start_time: float)
Source code in src/qgis_server_light/worker/redis.py
637 638 639 640 641 642 643 644 645 646 647 | |
finish_job(job_id: str, job_info: QslJobInfoParameter | None, pipeline: Pipeline, status: str, start_time: float)
Renews the expiry, sets the final status and notifies a waiting dispatcher. Success and failure only differ in the fields written before, so both end here.
Parameters:
-
job_id(str) –The unique identifier of the job.
-
job_info(QslJobInfoParameter | None) –The job info of the job,
Noneif it could not be read. A waiting dispatcher can not be ruled out then, so it is notified. -
pipeline(Pipeline) –The pipeline holding the transaction.
-
status(str) –The final status of the job.
-
start_time(float) –The time the job was taken from the queue.
Source code in src/qgis_server_light/worker/redis.py
547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 | |
job_guard(client: Redis, job_id: str, job_info: QslJobInfoParameter, start_time: float) -> JobGuard
Source code in src/qgis_server_light/worker/redis.py
576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 | |
succeed_job(job_id: str, job_info: QslJobInfoParameter, result: JobResult, pipeline: Pipeline, start_time: float)
Source code in src/qgis_server_light/worker/redis.py
621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 | |
main() -> None
Source code in src/qgis_server_light/worker/redis.py
656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 | |
runner
common
ImageRunner
Bases: MapRunner
Base class for any map runner which answers with an encoded image. Not runnable by itself.
Source code in src/qgis_server_light/worker/runner/common.py
485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 | |
image_formats()
classmethod
Source code in src/qgis_server_light/worker/runner/common.py
490 491 492 | |
JobContext
dataclass
What a runner needs to know about the worker it runs on. The engine hands each job its own copy.
Attributes:
-
base_path(str | Path) –The absolute path to the data dir.
-
process_allowlist(list[str]) –The ids of the QGIS algorithms the worker serves as processes.
-
process_output_dir(str | Path | None) –The absolute path to the dir the processes write their outputs to, each job into its own sub dir. Only the process runner needs it, it refuses to run without.
-
process_internal_allowlist(list[str]) –The ids of the QGIS algorithms the worker serves as processes for internal use of the consumer only, they must not be published.
-
process_timeout(float | None) –Seconds a process job may run,
Nonefor no limit. -
process_max_output_size(int | None) –Bytes a process job may write,
Nonefor no limit. -
process_max_features(int | None) –Features a vector layer input of a process may have,
Nonefor no limit. -
feedback(QgsProcessingFeedback | None) –The feedback a process job runs with, the engine reads the progress from it and cancels the job through it. It is set by the engine per job,
Noneif nobody listens.
Source code in src/qgis_server_light/worker/runner/common.py
40 41 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 | |
base_path: str | Path
instance-attribute
feedback: QgsProcessingFeedback | None = None
class-attribute
instance-attribute
process_allowlist: list[str] = field(default_factory=list)
class-attribute
instance-attribute
process_internal_allowlist: list[str] = field(default_factory=list)
class-attribute
instance-attribute
process_max_features: int | None = None
class-attribute
instance-attribute
process_max_output_size: int | None = None
class-attribute
instance-attribute
process_output_dir: str | Path | None = None
class-attribute
instance-attribute
process_timeout: float | None = None
class-attribute
instance-attribute
served_process_ids: list[str]
property
The ids of all algorithms the worker serves, published or internal.
__init__(base_path: str | Path, process_allowlist: list[str] = list(), process_output_dir: str | Path | None = None, process_internal_allowlist: list[str] = list(), process_timeout: float | None = None, process_max_output_size: int | None = None, process_max_features: int | None = None, feedback: QgsProcessingFeedback | None = None) -> None
MapRunner
Bases: Runner
Base class for any runner that interacts with a map. Not runnable by itself.
Source code in src/qgis_server_light/worker/runner/common.py
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 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 | |
context = context
instance-attribute
custom_layer_drivers = ['xyzvectortiles', 'mbtilesvectortiles']
class-attribute
instance-attribute
default_style_name = 'default'
class-attribute
instance-attribute
job_info = job_info
instance-attribute
layer_cache = layer_cache
instance-attribute
map_layers: list[QgsMapLayer] = list()
instance-attribute
qgis = qgis
instance-attribute
raster_layer_drivers = ['gdal', 'wms', 'xyz', 'arcgismapserver', 'wcs']
class-attribute
instance-attribute
vector_layer_drivers = ['ogr', 'postgres', 'spatialite', 'mssql', 'oracle', 'wfs', 'delimitedtext', 'gpx', 'arcgisfeatureserver']
class-attribute
instance-attribute
__init__(qgis: QgsApplication, context: JobContext, job_info: QslJobInfoParameter, layer_cache: MutableMapping | None = None) -> None
Source code in src/qgis_server_light/worker/runner/common.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | |
get_cache_name(job_layer_definition: QslJobLayer) -> str
Central method to decide which name is used in the cache to identify a layer.
Source code in src/qgis_server_light/worker/runner/common.py
251 252 253 254 255 256 257 258 259 260 261 262 | |
Runner
Bases: ABC
Source code in src/qgis_server_light/worker/runner/common.py
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 | |
job_info_class: type[QslJobInfoParameter]
instance-attribute
__init__(qgis: QgsApplication, context: JobContext, job_info: QslJobInfoParameter, layer_cache: MutableMapping | None)
Source code in src/qgis_server_light/worker/runner/common.py
80 81 82 83 84 85 86 87 88 | |
deserialize_job_info(job_info: bytes)
classmethod
Source code in src/qgis_server_light/worker/runner/common.py
104 105 106 | |
prepare(qgis: QgsApplication) -> None
classmethod
Sets up what the runner needs from QGIS before it gets its first job. The engine calls it once per runner it boots with, so a worker only pays for the runners it actually serves. Most runners need nothing.
Parameters:
-
qgis(QgsApplication) –The QGIS application of the worker.
Source code in src/qgis_server_light/worker/runner/common.py
94 95 96 97 98 99 100 101 102 | |
run()
Source code in src/qgis_server_light/worker/runner/common.py
90 91 92 | |
crs
CrsRunner
Bases: Runner
Resolves crs identifiers, it needs neither a map nor layers.
Source code in src/qgis_server_light/worker/runner/crs.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | |
context = context
instance-attribute
job_info = job_info
instance-attribute
job_info_class = QslJobInfoCrs
class-attribute
instance-attribute
qgis = qgis
instance-attribute
__init__(qgis: QgsApplication, context: JobContext, job_info: QslJobInfoCrs, layer_cache: MutableMapping | None = None) -> None
Source code in src/qgis_server_light/worker/runner/crs.py
19 20 21 22 23 24 25 26 27 28 | |
run()
Source code in src/qgis_server_light/worker/runner/crs.py
30 31 32 33 34 35 36 37 38 39 40 41 42 | |
feature
GetFeatureRunner
Bases: MapRunner
Source code in src/qgis_server_light/worker/runner/feature.py
34 35 36 37 38 39 40 41 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 | |
job_info_class = QslJobInfoFeature
class-attribute
instance-attribute
__init__(qgis: QgsApplication, context: JobContext, job_info: QslJobInfoFeature, layer_cache: MutableMapping | None = None, layer_style_cache: set | None = None) -> None
Source code in src/qgis_server_light/worker/runner/feature.py
37 38 39 40 41 42 43 44 45 | |
run()
Source code in src/qgis_server_light/worker/runner/feature.py
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 | |
feature_info
GetFeatureInfoRunner
Bases: MapRunner
Source code in src/qgis_server_light/worker/runner/feature_info.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 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 | |
job_info_class = QslJobInfoFeatureInfo
class-attribute
instance-attribute
__init__(qgis: QgsApplication, context: JobContext, job_info: QslJobInfoFeatureInfo, layer_cache: MutableMapping | None = None) -> None
Source code in src/qgis_server_light/worker/runner/feature_info.py
23 24 25 26 27 28 29 30 | |
run()
Source code in src/qgis_server_light/worker/runner/feature_info.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 | |
legend
GetLegendRunner
Bases: ImageRunner
Source code in src/qgis_server_light/worker/runner/legend.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 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 | |
job_info_class = QslJobInfoLegend
class-attribute
instance-attribute
__init__(qgis: QgsApplication, context: JobContext, job_info: QslJobInfoLegend, layer_cache: MutableMapping | None = None) -> None
Source code in src/qgis_server_light/worker/runner/legend.py
24 25 26 27 28 29 30 31 | |
json_formats()
classmethod
Source code in src/qgis_server_light/worker/runner/legend.py
33 34 35 | |
run()
Source code in src/qgis_server_light/worker/runner/legend.py
37 38 39 40 41 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 | |
process
ProcessRunner
Bases: MapRunner
Responsible for executing a QGIS processing algorithm as a process.
The runner decides on its own where the outputs go, the client only sends the inputs. This way concurrent jobs never write into the same file and a client can't make the worker write anywhere on its file system.
The format of a file output is chosen by the client among the media types
the process description offers for it, without a choice the first offered
one is used. Vector layers default to GeoJSON, because it takes any data:
a GeoPackage takes an input attribute fid as its feature id and fails if
the values are not unique, FlatGeobuf refuses features without geometry
because of its spatial index.
Attributes:
-
extension_by_media_type–The file extension a destination gets for the media type of its output.
-
media_type_by_extension–The media type of a destination file, by its extension.
Source code in src/qgis_server_light/worker/runner/process.py
36 37 38 39 40 41 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 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 | |
extension_by_media_type = {'application/geo+json': 'geojson', 'application/geopackage+sqlite3': 'gpkg', 'application/flatgeobuf': 'fgb', 'image/tiff; application=geotiff': 'tif', 'text/html': 'html'}
class-attribute
instance-attribute
job_info_class = QslJobInfoExecuteProcess
class-attribute
instance-attribute
media_type_by_extension = {'geojson': 'application/geo+json', 'gpkg': 'application/geopackage+sqlite3', 'fgb': 'application/flatgeobuf', 'tif': 'image/tiff; application=geotiff', 'html': 'text/html'}
class-attribute
instance-attribute
registry = self.qgis.processingRegistry()
instance-attribute
__init__(qgis: QgsApplication, context: JobContext, job_info: QslJobInfoExecuteProcess, layer_cache: MutableMapping | None = None)
Source code in src/qgis_server_light/worker/runner/process.py
73 74 75 76 77 78 79 80 81 | |
info(qgis: QgsApplication, context: JobContext) -> ProcessDescriptions
classmethod
The descriptions of the processes the worker serves. An algorithm of the allowlist the worker can't serve is skipped and logged, so one entry can't empty the processes of the worker. That's the case for a parameter without mapping and for an algorithm requiring a project, the context of the runner has none.
Parameters:
-
qgis(QgsApplication) –The QGIS application holding the processing registry.
-
context(JobContext) –The context holding the allowlists, the descriptions of the internal ones are marked
internal.
Returns:
-
ProcessDescriptions–The descriptions of the processes the worker serves.
Raises:
-
LookupError–If an algorithm of the allowlist is not in the processing registry.
Source code in src/qgis_server_light/worker/runner/process.py
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 | |
prepare(qgis: QgsApplication) -> None
classmethod
Adds the native: algorithms the processes are served from. A bare
QgsApplication knows no algorithms, and only a process-worker needs them.
Parameters:
-
qgis(QgsApplication) –The QGIS application of the worker.
Source code in src/qgis_server_light/worker/runner/process.py
83 84 85 86 87 88 89 90 91 92 93 94 95 | |
requires_project(algorithm: QgsProcessingAlgorithm) -> bool
staticmethod
If the algorithm needs a project, the processing context of the runner has none.
Source code in src/qgis_server_light/worker/runner/process.py
137 138 139 140 | |
run()
Run this runner.
Every job writes into its own dir {process_output_dir}/{job_id}. If the
job fails or is canceled, the dir is removed again, so only successful jobs
leave files behind.
Returns:
-
–
A JobResult with the ProcessResult as JSON.
Raises:
-
RuntimeError–If the algorithm is not served by this worker, is not found, requires a project or no process output dir is configured.
Source code in src/qgis_server_light/worker/runner/process.py
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 174 175 176 177 178 179 180 181 182 183 184 | |
render
RenderRunner
Bases: ImageRunner
Responsible for rendering a QslRenderJob to an image.
Source code in src/qgis_server_light/worker/runner/render.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |
job_info_class = QslJobInfoRender
class-attribute
instance-attribute
__init__(qgis: QgsApplication, context: JobContext, job_info: QslJobInfoRender, layer_cache: MutableMapping | None = None) -> None
Source code in src/qgis_server_light/worker/runner/render.py
18 19 20 21 22 23 24 25 | |
run()
Run this runner. Returns: A JobResult with the content_type and image_data (bytes) of the rendered image.
Source code in src/qgis_server_light/worker/runner/render.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |