Skip to content

Instantly share code, notes, and snippets.

View POD666's full-sized avatar
๐Ÿ™ƒ

Viktor Danyliuk POD666

๐Ÿ™ƒ
View GitHub Profile
@POD666
POD666 / Celery-Healthcheck HTTP Service.md
Last active June 5, 2024 15:54
celery-healthcheck http service

For a context where health checks are only available via http, e.g. render.com:

  • deploy celery as a web service
  • add healthchecks that trigger / url
    • celery-healthcheck.py will handle the request
    • perform a command that equals to celery inspect ping -d celery@$HOSTNAME
    • Returns 200 or 500 depending on a result

TODO: Contribute it to celery, e.g. something like running celery with:

@POD666
POD666 / Notion duplicate page script example (python)
Last active December 29, 2024 01:48
Notion page duplication requires recursive blocks population and extra tricks to duplicate images. Hope this example will help someone who also struggle with notion API.
import logging
import os
from io import BytesIO
import boto3
import click
import requests
# Written by Arno Bakker
# see LICENSE.txt for license information
#
import sys
import os
import shutil
import time
import tempfile
import urllib2