Period: Every day use
Task: Wash wooden boards with a bit of soap
, rinse in hot water, wipe clean, and allow to dry upright.
Period: Every few weeks Task
from app.lib.metrics import Summary, Counter, Guage, Profile | |
MEASURE_DEMO_TASK = Profile( | |
name = 'demo_task', | |
documentation = 'Measure throughput, latency and errors for demo task', | |
namespace = 'manage.project' | |
) | |
class DemoTaskHandler(TaskHandler): |
def get_request_from_user(): | |
payload = { | |
metric_name: 'xyz', | |
value: 1 | |
} | |
# Add payload to the queue | |
# which would we picked up by the worker to flush metric | |
add_job_to_metrics_flush_worker(payload) |