This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import absolute_import | |
import os | |
from celery import Celery | |
from django.conf import settings | |
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'voicechatproject.settings') | |
app = Celery('voicechatproject') | |
app.config_from_object('django.conf:settings') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import absolute_import | |
from .celery import app as celery_app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from celery import task | |
from django.core.mail import send_mail | |
@task(name="send_request_access_mail") | |
def send_request_access_mail(subject, message, sender, receivers): | |
send_mail(subject, message, sender, receivers) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from .models import * | |
from django.db.models.signals import post_save | |
from django.dispatch import receiver | |
from django.utils.encoding import force_bytes | |
from django.utils.http import urlsafe_base64_encode | |
from django.template.loader import render_to_string | |
from .tokens import account_activation_signup_token | |
from django.conf import settings | |
from request_access.tasks import send_request_access_mail |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BROKER_URL = 'redis://localhost:6379' | |
CELERY_RESULT_BACKEND = 'redis://localhost:6379' | |
CELERY_ACCEPT_CONTENT = ['application/json'] | |
CELERY_TASK_SERIALIZER = 'json' | |
CELERY_RESULT_SERIALIZER = 'json' | |
CELERY_TIMEZONE = 'Asia/Calcutta' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from botocore.exceptions import ClientError | |
from celery import task | |
from message.models import * | |
from celery.schedules import crontab | |
from celery.task import periodic_task | |
from django.db.models import Q | |
import datetime,boto3 | |
from django.conf import settings | |
from django.db import IntegrityError, transaction |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ================================== | |
; celery worker supervisor | |
; ================================== | |
; the name of your supervisord program | |
[program:voicechatproject_celery_worker] | |
; Set full path to celery program if using virtualenv | |
command=/home/er190622005/Botree/VoiceChat/chat_venv/bin/celery worker -A voicechatproject --loglevel=INFO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ================================ | |
; celery beat supervisor | |
; ================================ | |
; the name of your supervisord program | |
[program:voicechatproject_celery_beat] | |
; Set full path to celery program if using virtualenv | |
command=/home/er190622005/Botree/VoiceChat/chat_venv/bin/celery beat -A voicechatproject --loglevel=INFO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib.auth.models import User | |
user = User.objects.get(id=1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
from .managers import StudentManager, MaleManager, FemaleManager, StudentModifyManager, StudentQuerySet | |
from django.core.validators import MaxValueValidator | |
SEMESTER = ( | |
('sem1', 'sem1'), | |
('sem2', 'sem2'), | |
('sem3', 'sem3'), | |
('sem4', 'sem4'), | |
) |
OlderNewer