├── .gitignore ├── README.md ├── accounts.py ├── calculation ├── __init__.py ├── admin.py ├── apps.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_transferamount.py │ └── __init__.py ├── models.py ├── tasks.py ├── tests.py └── views.py ├── celeryapp ├── __init__.py ├── celery.py ├── settings.py ├── urls.py └── wsgi.py ├── manage.py └── requirements.txt /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/node,python,django,pycharm+all 3 | 4 | ### Django ### 5 | *.log 6 | *.pot 7 | *.pyc 8 | __pycache__/ 9 | local_settings.py 10 | db.sqlite3 11 | media 12 | 13 | # If your build process includes running collectstatic, then you probably don't need or want to include staticfiles/ 14 | # in your Git repository. Update and uncomment the following line accordingly. 15 | # /staticfiles/ 16 | staticfiles/ 17 | 18 | ### Node ### 19 | # Logs 20 | npm-debug.log* 21 | yarn-debug.log* 22 | yarn-error.log* 23 | 24 | # Runtime data 25 | pids 26 | *.pid 27 | *.seed 28 | *.pid.lock 29 | *.dat 30 | *.dir 31 | *.bak 32 | 33 | # Directory for instrumented libs generated by jscoverage/JSCover 34 | lib-cov 35 | 36 | # Coverage directory used by tools like istanbul 37 | coverage 38 | 39 | # nyc test coverage 40 | .nyc_output 41 | 42 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 43 | .grunt 44 | 45 | # Bower dependency directory (https://bower.io/) 46 | bower_components 47 | 48 | # node-waf configuration 49 | .lock-wscript 50 | 51 | # Compiled binary addons (http://nodejs.org/api/addons.html) 52 | build/Release 53 | 54 | # Dependency directories 55 | node_modules/ 56 | jspm_packages/ 57 | 58 | # Typescript v1 declaration files 59 | typings/ 60 | 61 | # Optional npm cache directory 62 | .npm 63 | 64 | # Optional eslint cache 65 | .eslintcache 66 | 67 | # Optional REPL history 68 | .node_repl_history 69 | 70 | # Output of 'npm pack' 71 | *.tgz 72 | 73 | # Yarn Integrity file 74 | .yarn-integrity 75 | 76 | # dotenv environment variables file 77 | .env 78 | 79 | 80 | ### PyCharm+all ### 81 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm 82 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 83 | 84 | # User-specific stuff: 85 | .idea/**/workspace.xml 86 | .idea/**/tasks.xml 87 | .idea/dictionaries 88 | 89 | # Sensitive or high-churn files: 90 | .idea/**/dataSources/ 91 | .idea/**/dataSources.ids 92 | .idea/**/dataSources.xml 93 | .idea/**/dataSources.local.xml 94 | .idea/**/sqlDataSources.xml 95 | .idea/**/dynamic.xml 96 | .idea/**/uiDesigner.xml 97 | 98 | # Gradle: 99 | .idea/**/gradle.xml 100 | .idea/**/libraries 101 | 102 | # CMake 103 | cmake-build-debug/ 104 | 105 | # Mongo Explorer plugin: 106 | .idea/**/mongoSettings.xml 107 | 108 | ## File-based project format: 109 | *.iws 110 | 111 | ## Plugin-specific files: 112 | 113 | # IntelliJ 114 | /out/ 115 | 116 | # mpeltonen/sbt-idea plugin 117 | .idea_modules/ 118 | 119 | # JIRA plugin 120 | atlassian-ide-plugin.xml 121 | 122 | # Cursive Clojure plugin 123 | .idea/replstate.xml 124 | 125 | # Crashlytics plugin (for Android Studio and IntelliJ) 126 | com_crashlytics_export_strings.xml 127 | crashlytics.properties 128 | crashlytics-build.properties 129 | fabric.properties 130 | 131 | ### PyCharm+all Patch ### 132 | # Ignores the whole idea folder 133 | # See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360 134 | 135 | .idea/ 136 | 137 | ### Python ### 138 | # Byte-compiled / optimized / DLL files 139 | *.py[cod] 140 | *$py.class 141 | 142 | # C extensions 143 | *.so 144 | 145 | # Distribution / packaging 146 | .Python 147 | env/ 148 | build/ 149 | develop-eggs/ 150 | dist/ 151 | downloads/ 152 | eggs/ 153 | .eggs/ 154 | lib/ 155 | lib64/ 156 | parts/ 157 | sdist/ 158 | var/ 159 | wheels/ 160 | *.egg-info/ 161 | .installed.cfg 162 | *.egg 163 | 164 | # PyInstaller 165 | # Usually these files are written by a python script from a template 166 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 167 | *.manifest 168 | *.spec 169 | 170 | # Installer logs 171 | pip-log.txt 172 | pip-delete-this-directory.txt 173 | 174 | # Unit test / coverage reports 175 | htmlcov/ 176 | .tox/ 177 | .coverage 178 | .coverage.* 179 | .cache 180 | nosetests.xml 181 | coverage.xml 182 | *,cover 183 | .hypothesis/ 184 | 185 | # Translations 186 | *.mo 187 | 188 | # Django stuff: 189 | 190 | # Flask stuff: 191 | instance/ 192 | .webassets-cache 193 | 194 | # Scrapy stuff: 195 | .scrapy 196 | 197 | # Sphinx documentation 198 | docs/_build/ 199 | 200 | # PyBuilder 201 | target/ 202 | 203 | # Jupyter Notebook 204 | .ipynb_checkpoints 205 | 206 | # pyenv 207 | .python-version 208 | 209 | # celery beat schedule file 210 | celerybeat-schedule 211 | 212 | # SageMath parsed files 213 | *.sage.py 214 | 215 | # dotenv 216 | 217 | # virtualenv 218 | .venv 219 | venv/ 220 | ENV/ 221 | 222 | # Spyder project settings 223 | .spyderproject 224 | .spyproject 225 | 226 | # Rope project settings 227 | .ropeproject 228 | 229 | # mkdocs documentation 230 | /site 231 | 232 | 233 | # End of https://www.gitignore.io/api/node,python,django,pycharm+all 234 | 235 | celerybeat-schedule.db 236 | 237 | 238 | # Created by https://www.gitignore.io/api/code 239 | 240 | ### Code ### 241 | # Visual Studio Code - https://code.visualstudio.com/ 242 | .settings/ 243 | .vscode/ 244 | tsconfig.json 245 | jsconfig.json 246 | 247 | 248 | # End of https://www.gitignore.io/api/code 249 | 250 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Django Celery Redis 2 | 3 | 4 | -------------------------------------------------------------------------------- /accounts.py: -------------------------------------------------------------------------------- 1 | data = [ 2 | { 3 | 'identify': '0006-0000000002', 4 | 'amount': '120000' 5 | }, 6 | { 7 | 'identify': '0006-0000000002', 8 | 'amount': '5000' 9 | }, 10 | { 11 | 'identify': '0006-0000000002', 12 | 'amount': '5000' 13 | }, 14 | { 15 | 'identify': '0006-0000000004', 16 | 'amount': '5000' 17 | } 18 | ] 19 | 20 | balance = [ 21 | { 22 | 'identify': '0006-0000000002', 23 | 'amount': '10000' 24 | }, 25 | { 26 | 'identify': '0006-0000000004', 27 | 'amount': '16000' 28 | } 29 | ] 30 | 31 | 32 | def check_balance(account): 33 | for i in balance: 34 | if i['identify'] == account: 35 | current_bal = i['amount'] 36 | return current_bal 37 | 38 | 39 | # print(check_balance('0006-0000000004')) 40 | 41 | for i in data: 42 | current_bal = check_balance(i['identify']) 43 | if float(i['amount']) <= float(current_bal): 44 | new_bal = float(current_bal) - float(i['amount']) 45 | print(new_bal) 46 | else: 47 | print('No balance.') 48 | 49 | 50 | 51 | # def balance(bal): 52 | # current_amount = float([data]['amount']) - bal 53 | # return current_amount 54 | # 55 | # 56 | # print(balance(100)) 57 | -------------------------------------------------------------------------------- /calculation/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webtopcoder/Celery-and-Redis/02b99e4f97b713b0b2019e545d0bcdac472e68cf/calculation/__init__.py -------------------------------------------------------------------------------- /calculation/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import Balances, GetData, TransferAmount 3 | 4 | # Register your models here. 5 | 6 | admin.site.register(Balances) 7 | admin.site.register(GetData) 8 | admin.site.register(TransferAmount) 9 | -------------------------------------------------------------------------------- /calculation/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class CalculationConfig(AppConfig): 5 | name = 'calculation' 6 | -------------------------------------------------------------------------------- /calculation/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.7 on 2017-11-28 07:45 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | initial = True 11 | 12 | dependencies = [ 13 | ] 14 | 15 | operations = [ 16 | migrations.CreateModel( 17 | name='Balances', 18 | fields=[ 19 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 20 | ('identify', models.CharField(max_length=20)), 21 | ('amount', models.DecimalField(decimal_places=4, max_digits=14)), 22 | ], 23 | ), 24 | migrations.CreateModel( 25 | name='GetData', 26 | fields=[ 27 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 28 | ('identify', models.CharField(max_length=20)), 29 | ('is_disabled', models.BooleanField(default=False)), 30 | ('amount', models.DecimalField(decimal_places=4, max_digits=14)), 31 | ('last_payment', models.DateTimeField(blank=True, null=True)), 32 | ('next_payment', models.DateTimeField(blank=True, null=True)), 33 | ('timestamp', models.DateTimeField()), 34 | ], 35 | ), 36 | ] 37 | -------------------------------------------------------------------------------- /calculation/migrations/0002_transferamount.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.11.7 on 2017-11-28 07:59 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | dependencies = [ 11 | ('calculation', '0001_initial'), 12 | ] 13 | 14 | operations = [ 15 | migrations.CreateModel( 16 | name='TransferAmount', 17 | fields=[ 18 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 19 | ('identify', models.CharField(max_length=20)), 20 | ('amount', models.DecimalField(decimal_places=4, max_digits=14)), 21 | ('timestamp', models.DateTimeField()), 22 | ], 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /calculation/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webtopcoder/Celery-and-Redis/02b99e4f97b713b0b2019e545d0bcdac472e68cf/calculation/migrations/__init__.py -------------------------------------------------------------------------------- /calculation/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.db.models import Q 3 | from django.utils import timezone 4 | import datetime 5 | 6 | # Create your models here. 7 | 8 | 9 | class GetDataManager(models.Manager): 10 | 11 | @staticmethod 12 | def check_balance(identify): 13 | current_bal = Balances.objects.get(identify=identify).amount 14 | return current_bal 15 | 16 | def get_data_from_db(self): 17 | get_data = self.filter(Q(is_disabled=False)) 18 | 19 | for data in get_data: 20 | account = data.identify 21 | current_bal = self.check_balance(account) 22 | if float(data.amount) <= float(current_bal): 23 | TransferAmount.objects.create( 24 | identify=data.identify, 25 | amount=data.amount, 26 | timestamp=timezone.now() 27 | ) 28 | get_update_table = self.filter(pk=data.id) 29 | next_date = datetime.datetime.now() + datetime.timedelta(days=30) 30 | get_update_table.update( 31 | last_payment=timezone.now(), 32 | next_payment=next_date 33 | ) 34 | balance_table = Balances.objects.filter(identify=data.identify) 35 | # balance_table_update = balance_table.pk 36 | new_amount = float(current_bal) - float(data.amount) 37 | balance_table.update( 38 | amount=new_amount 39 | ) 40 | elif float(data.amount) > float(current_bal): 41 | message = {"message": "You have no balance.", "status": 400} 42 | return message 43 | else: 44 | continue 45 | 46 | message = {"message": "Task has been completed."} 47 | return message 48 | 49 | 50 | class Balances(models.Model): 51 | identify = models.CharField(max_length=20) 52 | amount = models.DecimalField(max_digits=14, decimal_places=4) 53 | 54 | def __str__(self): 55 | return self.identify 56 | 57 | 58 | class GetData(models.Model): 59 | identify = models.CharField(max_length=20) 60 | is_disabled = models.BooleanField(default=False) 61 | amount = models.DecimalField(max_digits=14, decimal_places=4) 62 | last_payment = models.DateTimeField(null=True, blank=True) 63 | next_payment = models.DateTimeField(null=True, blank=True) 64 | timestamp = models.DateTimeField() 65 | 66 | objects = GetDataManager() 67 | 68 | def __str__(self): 69 | return self.identify 70 | 71 | 72 | class TransferAmount(models.Model): 73 | identify = models.CharField(max_length=20) 74 | amount = models.DecimalField(max_digits=14, decimal_places=4) 75 | timestamp = models.DateTimeField() 76 | 77 | def __str__(self): 78 | return self.identify 79 | -------------------------------------------------------------------------------- /calculation/tasks.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import, unicode_literals 2 | from celery import shared_task 3 | from .models import GetData 4 | 5 | 6 | @shared_task(name='vubon') 7 | def test(): 8 | print(' Hello world') 9 | return 'test' 10 | 11 | 12 | @shared_task(name="data_checking") 13 | def data_add(): 14 | json_data = GetData.objects.get_data_from_db() 15 | return json_data 16 | -------------------------------------------------------------------------------- /calculation/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /calculation/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | 3 | # Create your views here. 4 | -------------------------------------------------------------------------------- /celeryapp/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | # This will make sure the app is always imported when 4 | # Django starts so that shared_task will use this app. 5 | from .celery import app as celery_app # noqa -------------------------------------------------------------------------------- /celeryapp/celery.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import, unicode_literals 2 | import os 3 | from celery import Celery, shared_task 4 | from django.conf import settings 5 | from celery.schedules import crontab 6 | # set the default Django settings module for the 'celery' program. 7 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'celeryapp.settings') 8 | 9 | app = Celery('celeryapp') 10 | 11 | # Using a string here means the worker don't have to serialize 12 | # the configuration object to child processes. 13 | # - namespace='CELERY' means all celery-related configuration keys 14 | # should have a `CELERY_` prefix. 15 | app.config_from_object('django.conf:settings', namespace='CELERY') 16 | 17 | # Load task modules from all registered Django app configs. 18 | app.autodiscover_tasks() 19 | 20 | 21 | @app.task(bind=True) 22 | def debug_task(self): 23 | print('Request: {0!r}'.format(self.request)) 24 | print('hello world') 25 | 26 | 27 | app.conf.beat_schedule = { 28 | 'add-every-5-seconds': { 29 | 'task': 'vubon', 30 | 'schedule': 5.0, 31 | }, 32 | 'add-every-minute-contrab': { 33 | 'task': 'data_checking', 34 | 'schedule': crontab(minute=1), 35 | }, 36 | } -------------------------------------------------------------------------------- /celeryapp/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for celeryapp project. 3 | 4 | Generated by 'django-admin startproject' using Django 1.11.7. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/1.11/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/1.11/ref/settings/ 11 | """ 12 | 13 | import os 14 | 15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 17 | 18 | 19 | # Quick-start development settings - unsuitable for production 20 | # See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ 21 | 22 | # SECURITY WARNING: keep the secret key used in production secret! 23 | SECRET_KEY = '&t)v(kecs%u%87f)r$%3d*tmxywrzyeeg64ze&cqhv%i4hu$r1' 24 | 25 | # SECURITY WARNING: don't run with debug turned on in production! 26 | DEBUG = True 27 | 28 | ALLOWED_HOSTS = [] 29 | 30 | 31 | # Application definition 32 | 33 | INSTALLED_APPS = [ 34 | 'django.contrib.admin', 35 | 'django.contrib.auth', 36 | 'django.contrib.contenttypes', 37 | 'django.contrib.sessions', 38 | 'django.contrib.messages', 39 | 'django.contrib.staticfiles', 40 | 'django_celery_results', 41 | 'calculation', 42 | 'django_extensions', 43 | ] 44 | 45 | 46 | MIDDLEWARE = [ 47 | 'django.middleware.security.SecurityMiddleware', 48 | 'django.contrib.sessions.middleware.SessionMiddleware', 49 | 'django.middleware.common.CommonMiddleware', 50 | 'django.middleware.csrf.CsrfViewMiddleware', 51 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 52 | 'django.contrib.messages.middleware.MessageMiddleware', 53 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 54 | ] 55 | 56 | ROOT_URLCONF = 'celeryapp.urls' 57 | 58 | TEMPLATES = [ 59 | { 60 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 61 | 'DIRS': [], 62 | 'APP_DIRS': True, 63 | 'OPTIONS': { 64 | 'context_processors': [ 65 | 'django.template.context_processors.debug', 66 | 'django.template.context_processors.request', 67 | 'django.contrib.auth.context_processors.auth', 68 | 'django.contrib.messages.context_processors.messages', 69 | ], 70 | }, 71 | }, 72 | ] 73 | 74 | WSGI_APPLICATION = 'celeryapp.wsgi.application' 75 | 76 | 77 | # Database 78 | # https://docs.djangoproject.com/en/1.11/ref/settings/#databases 79 | 80 | DATABASES = { 81 | # 'default': { 82 | # 'ENGINE': 'django.db.backends.sqlite3', 83 | # 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 84 | # } 85 | 'default': { 86 | 'ENGINE': 'django.db.backends.postgresql', 87 | 'NAME': 'db_name', 88 | 'USER': 'username', 89 | #'PASSWORD': 'mypassword', 90 | 'HOST': 'localhost', 91 | 'PORT': '5432', 92 | } 93 | } 94 | 95 | 96 | # Password validation 97 | # https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators 98 | 99 | AUTH_PASSWORD_VALIDATORS = [ 100 | { 101 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 102 | }, 103 | { 104 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 105 | }, 106 | { 107 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 108 | }, 109 | { 110 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 111 | }, 112 | ] 113 | 114 | 115 | # Internationalization 116 | # https://docs.djangoproject.com/en/1.11/topics/i18n/ 117 | 118 | LANGUAGE_CODE = 'en-us' 119 | 120 | TIME_ZONE = 'Asia/Dhaka' 121 | 122 | USE_I18N = True 123 | 124 | USE_L10N = True 125 | 126 | USE_TZ = True 127 | 128 | 129 | # Static files (CSS, JavaScript, Images) 130 | # https://docs.djangoproject.com/en/1.11/howto/static-files/ 131 | 132 | STATIC_URL = '/static/' 133 | 134 | # Celery base setup 135 | CELERY_BROKER_URL = 'redis://localhost:6379' 136 | CELERY_RESULT_BACKEND = 'redis://localhost:6379' 137 | CELERY_ACCEPT_CONTENT = ['application/json'] 138 | CELERY_TASK_SERIALIZER = 'json' 139 | CELERY_RESULT_SERIALIZER = 'json' 140 | CELERY_TIMEZONE = TIME_ZONE -------------------------------------------------------------------------------- /celeryapp/urls.py: -------------------------------------------------------------------------------- 1 | """celeryapp URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/1.11/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.conf.urls import url, include 14 | 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) 15 | """ 16 | from django.conf.urls import url 17 | from django.contrib import admin 18 | 19 | urlpatterns = [ 20 | url(r'^admin/', admin.site.urls), 21 | ] 22 | -------------------------------------------------------------------------------- /celeryapp/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for celeryapp project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "celeryapp.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "celeryapp.settings") 7 | try: 8 | from django.core.management import execute_from_command_line 9 | except ImportError: 10 | # The above import may fail for some other reason. Ensure that the 11 | # issue is really that Django is missing to avoid masking other 12 | # exceptions on Python 2. 13 | try: 14 | import django 15 | except ImportError: 16 | raise ImportError( 17 | "Couldn't import Django. Are you sure it's installed and " 18 | "available on your PYTHONPATH environment variable? Did you " 19 | "forget to activate a virtual environment?" 20 | ) 21 | raise 22 | execute_from_command_line(sys.argv) 23 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | amqp==2.2.2 2 | billiard==3.5.0.3 3 | celery>=5.2.2 4 | django>=1.11.19 5 | django-celery-results==2.2.0 6 | kombu==4.1.0 7 | psycopg2==2.7.3.2 8 | pytz==2017.3 9 | redis==2.10.6 10 | vine==1.1.4 11 | --------------------------------------------------------------------------------