Skip to content

Instantly share code, notes, and snippets.

View AntoineAugusti's full-sized avatar
🚄
High speed, low carbon

Antoine Augusti AntoineAugusti

🚄
High speed, low carbon
View GitHub Profile
@miraculixx
miraculixx / README
Last active October 14, 2024 08:42
Celery worker blocks on rate limited task
Celery worker blocks on rate limited task
=========================================
by github.com/miraculixx
Problem:
If a worker has a rate_limit active on some task, and that task
arrives (is received) more often than the rate limit interval, all
worker processes will block on these task instances and stop
consuming other tasks as soon as the prefetch count has maxed out
@filipecabaco
filipecabaco / form_from_schema.ex
Created March 31, 2023 10:41
Simple component to build forms from a given schema
defmodule AppWeb.Component.FormFromSchema do
use AppWeb, :live_component
attr :changeset, :any, required: true
attr :event_suffix, :string, default: ""
attr :schema, :any, required: true
attr :uploads, :any, default: nil
attr :visibility_rules, :any, default: %{}
attr :field_type_rules, :any, default: %{}