Skip to content

Instantly share code, notes, and snippets.

Aditya Kalyanakrishnan adityak2190

Block or report user

Report or block adityak2190

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@adityak2190
adityak2190 / run.py
Created Sep 5, 2018
Part of the blog post - Timeouts and Retries which will walk through how to combine timeouts and retries in Celery - http://adikrishnan.in/2018/09/05/timeouts-and-retries/
View run.py
from tasks import timeout_and_chords
timeout_and_chords.delay()
@adityak2190
adityak2190 / run.py
Last active Sep 5, 2018
Part of the blog post - Timeouts and Retries which will walk through how to combine timeouts and retries in Celery - http://adikrishnan.in/2018/09/05/timeouts-and-retries/
View run.py
from tasks import hello, timeout_test, retry_timeout_test, max_retries_test, max_retries_test_2
hello.delay()
timeout_test.delay()
retry_timeout_test.delay()
max_retries_test.delay()
max_retries_test_2.delay()
@adityak2190
adityak2190 / run.py
Last active May 30, 2018
Part of the blog post - Playing with Chords - Celery which will walk through how to use "chords" structure in Celery - https://adikrishnan.in/2018/05/30/playing-with-chords-celery/
View run.py
# Refer https://adikrishnan.in/2018/05/30/playing-with-chords-celery/ for understanding the concept.
from tasks import hello, chord_service, non_chord_service
hello.delay()
chord_service.delay()
non_chord_service.delay()
@adityak2190
adityak2190 / run.py
Last active May 30, 2018
Part of the blog post - Celery - Groups & Loops which explore a few questions I had with Celery and parallelism on it using groups and implementing the same feature using blocking for loop and non-blocking for loop - https://adikrishnan.in/2018/05/30/celery-groups-loops-parallelism/
View run.py
# Refer https://adikrishnan.in/2018/05/30/celery-groups-loops-parallelism/ for understanding the concept.
from tasks import run_ping, hello, loop_service, group_service
hello.delay()
loop_service.delay()
group_service.delay()
@adityak2190
adityak2190 / py_web_service_gunicorn.conf
Created Jul 13, 2017
Supervisor template configurations
View py_web_service_gunicorn.conf
[supervisord]
# [program:<samplepyservice>]
[program:myapp]
# directory=<path_to_project>
directory=/var/www/myapp
# command=<path_to_project_env>/env/bin/gunicorn -b 127.0.0.1:<port_num> -w 4 <app_name>:app
command=/var/www/myapp/env/bin/gunicorn -b 127.0.0.1:5000 -w 4 myapp:app
autostart=true
autorestart=true
# user=<username>
@adityak2190
adityak2190 / .bash_profile
Last active Sep 27, 2018
Vim and Bash Profile Settings
View .bash_profile
alias vi='vim'
alias ls='ls -lh --color=auto'
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
export FLASK_APP=runserver.py
@adityak2190
adityak2190 / Vagrantfile
Last active Jan 1, 2018
Adi's Vagrant Settings
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.hostname = "cygnus"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.provision "shell", path: "setup_environment.sh"
end
You can’t perform that action at this time.