MCPcopy
hub / github.com/mher/flower / get

Method get

flower/api/tasks.py:574–638  ·  view source on GitHub ↗

Get a task info **Example request**: .. sourcecode:: http GET /api/task/info/91396550-c228-4111-9da4-9d88cfd5ddc6 HTTP/1.1 Accept: */* Accept-Encoding: gzip, deflate, compress Host: localhost:5555 **Example response**: .. sourcecode:: http HTTP/1.1 200 OK Content-Length: 575 Co

(self, taskid)

Source from the content-addressed store, hash-verified

572class TaskInfo(BaseTaskHandler):
573 @web.authenticated
574 def get(self, taskid):
575 """
576Get a task info
577
578**Example request**:
579
580.. sourcecode:: http
581
582 GET /api/task/info/91396550-c228-4111-9da4-9d88cfd5ddc6 HTTP/1.1
583 Accept: */*
584 Accept-Encoding: gzip, deflate, compress
585 Host: localhost:5555
586
587
588**Example response**:
589
590.. sourcecode:: http
591
592 HTTP/1.1 200 OK
593 Content-Length: 575
594 Content-Type: application/json; charset=UTF-8
595
596 {
597 "args": "[2, 2]",
598 "client": null,
599 "clock": 25,
600 "eta": null,
601 "exception": null,
602 "exchange": null,
603 "expires": null,
604 "failed": null,
605 "kwargs": "{}",
606 "name": "tasks.add",
607 "received": 1400806241.970742,
608 "result": "'4'",
609 "retried": null,
610 "retries": null,
611 "revoked": null,
612 "routing_key": null,
613 "runtime": 2.0037889280356467,
614 "sent": null,
615 "started": 1400806241.972624,
616 "state": "SUCCESS",
617 "succeeded": 1400806243.975336,
618 "task-id": "91396550-c228-4111-9da4-9d88cfd5ddc6",
619 "timestamp": 1400806243.975336,
620 "traceback": null,
621 "worker": "celery@worker1"
622 }
623
624:reqheader Authorization: optional OAuth token to authenticate
625:statuscode 200: no error
626:statuscode 401: unauthorized request
627:statuscode 404: unknown task
628 """
629
630 task = tasks.get_task_by_id(self.application.events, taskid)
631 if not task:

Callers 15

eventMethod · 0.45
extract_settingsFunction · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
_get_redis_clientMethod · 0.45
__init__Method · 0.45
abs_pathFunction · 0.45
get_task_by_idFunction · 0.45
satisfies_search_termsFunction · 0.45
setFunction · 0.45

Calls 1

get_task_by_idMethod · 0.80

Tested by

no test coverage detected