Return detail of tasks currently executed by workers. Arguments: *ids (str): IDs of tasks to be queried. Returns: Dict: Dictionary ``{HOSTNAME: {TASK_ID: [STATE, TASK_INFO]}}``. Here is the list of ``TASK_INFO`` fields: * ``id`` - ID of
(self, *ids)
| 338 | return self._request('active_queues') |
| 339 | |
| 340 | def query_task(self, *ids): |
| 341 | """Return detail of tasks currently executed by workers. |
| 342 | |
| 343 | Arguments: |
| 344 | *ids (str): IDs of tasks to be queried. |
| 345 | |
| 346 | Returns: |
| 347 | Dict: Dictionary ``{HOSTNAME: {TASK_ID: [STATE, TASK_INFO]}}``. |
| 348 | |
| 349 | Here is the list of ``TASK_INFO`` fields: |
| 350 | * ``id`` - ID of the task |
| 351 | * ``name`` - Name of the task |
| 352 | * ``args`` - Positinal arguments passed to the task |
| 353 | * ``kwargs`` - Keyword arguments passed to the task |
| 354 | * ``type`` - Type of the task |
| 355 | * ``hostname`` - Hostname of the worker processing the task |
| 356 | * ``time_start`` - Time of processing start |
| 357 | * ``acknowledged`` - True when task was acknowledged to broker |
| 358 | * ``delivery_info`` - Dictionary containing delivery information |
| 359 | * ``exchange`` - Name of exchange where task was published |
| 360 | * ``routing_key`` - Routing key used when task was published |
| 361 | * ``priority`` - Priority used when task was published |
| 362 | * ``redelivered`` - True if the task was redelivered |
| 363 | * ``worker_pid`` - PID of worker processing the task |
| 364 | |
| 365 | """ |
| 366 | # signature used be unary: query_task(ids=[id1, id2]) |
| 367 | # we need this to preserve backward compatibility. |
| 368 | if len(ids) == 1 and isinstance(ids[0], (list, tuple)): |
| 369 | ids = ids[0] |
| 370 | return self._request('query_task', ids=ids) |
| 371 | |
| 372 | def conf(self, with_defaults=False): |
| 373 | """Return configuration of each worker. |