dispatcher
dispatcher
common
Status
Bases: Enum
Source code in src/qgis_server_light/interface/dispatcher/common.py
4 5 6 7 8 | |
FAILURE = 'failed'
class-attribute
instance-attribute
QUEUED = 'queued'
class-attribute
instance-attribute
RUNNING = 'running'
class-attribute
instance-attribute
SUCCESS = 'succeed'
class-attribute
instance-attribute
redis_asio
This contains the interface definition about how a job info is passed around a redis queue.
RedisQueue
Source code in src/qgis_server_light/interface/dispatcher/redis_asio.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 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 | |
client = redis_client
instance-attribute
job_channel_name: str = 'notifications'
class-attribute
instance-attribute
job_duration_key: str = 'duration'
class-attribute
instance-attribute
job_info_key: str = 'info'
class-attribute
instance-attribute
job_info_type_key: str = 'info_type'
class-attribute
instance-attribute
job_last_update_key: str = f'{job_timestamp_key}.last_update'
class-attribute
instance-attribute
job_queue_name: str = 'jobs'
class-attribute
instance-attribute
job_status_key: str = 'status'
class-attribute
instance-attribute
job_timestamp_key: str = 'timestamp'
class-attribute
instance-attribute
__init__(redis_client: redis_aio.Redis) -> None
Source code in src/qgis_server_light/interface/dispatcher/redis_asio.py
48 49 50 51 52 53 | |
create(url: str)
classmethod
Source code in src/qgis_server_light/interface/dispatcher/redis_asio.py
55 56 57 58 | |
post(job_parameter: QslJobParameterRender | QslJobParameterFeatureInfo | QslJobParameterLegend | QslJobParameterFeature, to: float = 10.0) -> tuple[JobResult, str]
async
Posts a new runner to the runner queue and waits maximum timeout seconds to complete.
Will return a JobResult if successful or raise an error.
Parameters:
-
job_parameter(QslJobParameterRender | QslJobParameterFeatureInfo | QslJobParameterLegend | QslJobParameterFeature) –The parameter for the job which should be executed.
-
to(float, default:10.0) –The timeout a job is expected to be waited for before canceling job execution.
Source code in src/qgis_server_light/interface/dispatcher/redis_asio.py
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 | |
set_job_runtime_status(job_id, pipeline: Pipeline, status: str, start_time: float)
async
Source code in src/qgis_server_light/interface/dispatcher/redis_asio.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | |