Miroca_Server

This commit is contained in:
Victor Alexandrovich Tsyrenschikov
2026-01-02 00:07:37 +05:00
parent 7ab28ed366
commit c9ae31bc3d
100 changed files with 3108 additions and 0 deletions

2
tasks/__init__.py Normal file
View File

@@ -0,0 +1,2 @@
# import celery
from celery import app as celery_app

3
tasks/admin.py Normal file
View File

@@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.

6
tasks/apps.py Normal file
View File

@@ -0,0 +1,6 @@
from django.apps import AppConfig
class TasksConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'tasks'

3
tasks/models.py Normal file
View File

@@ -0,0 +1,3 @@
from django.db import models
# Create your models here.

7
tasks/tasks.py Normal file
View File

@@ -0,0 +1,7 @@
from celery import Celery
app = Celery('tasks', broker='amqp://172.17.0.4:5672')
@app.task
def add(x, y):
return x + y

3
tasks/tests.py Normal file
View File

@@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

3
tasks/views.py Normal file
View File

@@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.