Skip to content

Instantly share code, notes, and snippets.

@richard24se
richard24se / celery.py
Created April 29, 2020 16:09 — forked from IrSent/celery.py
Celery Best Practices
# Safe Queue Celery App Settings
from __future__ import absolute_import, unicode_literals
from celery import Celery
app = Celery('some_project',
broker='amqp://',
backend='amqp://',
include=['some_project.tasks'])
@richard24se
richard24se / celery.sh
Created April 27, 2020 14:43 — forked from amatellanes/celery.sh
Celery handy commands
/* Useful celery config.
app = Celery('tasks',
broker='redis://localhost:6379',
backend='redis://localhost:6379')
app.conf.update(
CELERY_TASK_RESULT_EXPIRES=3600,
CELERY_QUEUES=(
Queue('default', routing_key='tasks.#'),
#!/bin/bash
# Copyright 2017-2019 JetsonHacks
# MIT License
# Create a swap file and set up permissions
# If a parameter is passed, it should be the place to create the swapfile
set -e
SWAPDIRECTORY="/mnt"
# Ubuntu recommends 6GB for 4GB of memory when using suspend
# You can use 1 or 2 if need be
SWAPSIZE=6
function dogrant{
$actualPath = Get-Location | select Path -ExpandProperty Path
#EDIT THIS PATH
$remotePath = "apps/"
#USE TYPE DIRECTORY LIKE THIS :---> c:\apps\backend\users or c:\apps\frotend\sync
$parent = (get-item $(Get-Location)).parent | select Name -ExpandProperty Name
$current = Split-Path -leaf -path (Get-Location)
$targetPath = $remotePath+""+$parent+"/"+$current
#EDIT DIRECTORY OF VAGRANT
cd C:\vagrant