If you have Redis integration in Datadog, there is an easy way to add monitoring for celery queues.
If you have Redis integration in Datadog, there is an easy way to add monitoring for celery queues.
The more simple way is to add an endpoint to the service with celery. Here is an example of a low level way based on Message Protocol.
It’s my first mechanical keyboard and it’s about a year that I’m interesting to try it. I like my apple keyboard, but there are so many reviews for the mechanical ones, so finally I gave up and bought this IQUNIX A80.
I bought iPad 11" one year ago and I had a lot of doubts about it usefulness, it’s not one of the cheapest devices. If you are in the same position, maybe this post will help you.
If you, like me, suffer from celery banner in your logs, but still want to see useful information from it.
Here is the previous version of the script to transfer containers between storages.
AzCopy v10 has totally different parameters, in fact, it’s another utility that does the same thing.
Instead of --source, --dest parameters, it now requires a SAS token.
#!/bin/bash
CONTAINER_NAME=$1
SOURCE_STORAGE_NAME=$2
SOURCE_STORAGE_KEY=$3
TARGET_STORAGE_NAME=$4
TARGET_STORAGE_KEY=$5
source_exists=$(az storage container exists --name $CONTAINER_NAME --account-name $SOURCE_STORAGE_NAME --account-key $SOURCE_STORAGE_KEY --output tsv)
if [ $source_exists != "True" ]; then
echo "Source container does not exist." 1>&2
exit 1
fi;
access_level=$(az storage container show-permission -n $CONTAINER_NAME --account-name $SOURCE_STORAGE_NAME --account-key $SOURCE_STORAGE_KEY --output tsv)
target_exists=$(az storage container exists --name $CONTAINER_NAME --account-name $TARGET_STORAGE_NAME --account-key $TARGET_STORAGE_KEY --output tsv)
if [ $target_exists != "True" ]; then
az storage container create --name $CONTAINER_NAME --public-access $access_level --account-name $TARGET_STORAGE_NAME --account-key $TARGET_STORAGE_KEY
fi;
expiry=$(python -c "from datetime import datetime, timedelta; print((datetime.utcnow() + timedelta(hours=1)).strftime('%Y-%m-%dT%H:%M:%SZ'))")
source_sas=$(az storage container generate-sas --name $CONTAINER_NAME --expiry $expiry --permissions lr --account-name $SOURCE_STORAGE_NAME --account-key $SOURCE_STORAGE_KEY -o tsv)
target_sas=$(az storage container generate-sas --name $CONTAINER_NAME --expiry $expiry --permissions aclrw --account-name $TARGET_STORAGE_NAME --account-key $TARGET_STORAGE_KEY -o tsv)
azcopy copy https://$SOURCE_STORAGE_NAME.blob.core.windows.net/$CONTAINER_NAME?$source_sas https://$TARGET_STORAGE_NAME.blob.core.windows.net/$CONTAINER_NAME?$target_sas --recursive
To run this script in Docker container:
FROM mcr.microsoft.com/azure-cli:2.7.0
RUN wget https://aka.ms/downloadazcopy-v10-linux -O /tmp/azcopy.tgz \
&& export BIN_LOCATION=$(tar -tzf /tmp/azcopy.tgz | grep "/azcopy") \
&& tar -xzf /tmp/azcopy.tgz $BIN_LOCATION --strip-components=1 -C /usr/local/bin
docker build -t azure-cli .
docker run --rm -it -v `pwd`/script.sh:/script.sh azure-cli bash
This is an example of how to transform sequential requests to parallel in some legacy code with asyncio loop when the refactoring is not an option.
To show the idea I’m using a simplified version of microsoft graph api requests to get user manager by user ids.
It’s almost two years when I switched to VSCode from IntelliJ IDEA. The last license expired in September 2018. Sometimes I switched back to IDEA when there were problems with Python Language Server or pytests discovering, but it did not last long. The IDEA is good, it works well, but it’s too heavy for me, even if I do not restart it often. With VSCode I still have sometimes problems with “Go to Definition”, but most of the time it solves with a simple reload, which takes just several seconds.
Mostly I’m using the settings by default, here are some changes:
To run tests I usually use database with tmpfs volume, sometimes it makes them more than twice faster. To achieve this I run the database on another port and use env variable in application config, like this
docker run -d --name=mongo_test -p 27018:27017 --tmpfs /data/db mongo:4.2.3
MONGODB_URI=mongodb://localhost:27018/test_db pytest --cov=app tests
The configuration for env variables in VSCode is simple,
you need to place .env file into your project and add "python.envFile": "${workspaceFolder}/.env" to .vscode/settings.json, reload the window.
When you’ll run tests in VSCode, it will use these variables.
© 2026 Andrey Zhukov's Tech Blog.