tasks.py — flask Source File
Architecture documentation for tasks.py, a python file in the flask codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 1168fc87_690a_5517_76fc_d21ff09b96f3["tasks.py"] f3e0b8c8_476c_6c34_756d_dc6a78cddd40["time"] 1168fc87_690a_5517_76fc_d21ff09b96f3 --> f3e0b8c8_476c_6c34_756d_dc6a78cddd40 14129390_0281_6bfd_c9e4_d05e966d2c95["celery"] 1168fc87_690a_5517_76fc_d21ff09b96f3 --> 14129390_0281_6bfd_c9e4_d05e966d2c95 style 1168fc87_690a_5517_76fc_d21ff09b96f3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import time
from celery import shared_task
from celery import Task
@shared_task(ignore_result=False)
def add(a: int, b: int) -> int:
return a + b
@shared_task()
def block() -> None:
time.sleep(5)
@shared_task(bind=True, ignore_result=False)
def process(self: Task, total: int) -> object:
for i in range(total):
self.update_state(state="PROGRESS", meta={"current": i + 1, "total": total})
time.sleep(1)
return {"current": total, "total": total}
Domain
Subdomains
Dependencies
- celery
- time
Source
Frequently Asked Questions
What does tasks.py do?
tasks.py is a source file in the flask codebase, written in python. It belongs to the ApplicationCore domain, AppLifeCycle subdomain.
What functions are defined in tasks.py?
tasks.py defines 3 function(s): add, block, process.
What does tasks.py depend on?
tasks.py imports 2 module(s): celery, time.
Where is tasks.py in the architecture?
tasks.py is located at examples/celery/src/task_app/tasks.py (domain: ApplicationCore, subdomain: AppLifeCycle, directory: examples/celery/src/task_app).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free