Miroca_Server
This commit is contained in:
2
tasks/__init__.py
Normal file
2
tasks/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
# import celery
|
||||
from celery import app as celery_app
|
||||
3
tasks/admin.py
Normal file
3
tasks/admin.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
6
tasks/apps.py
Normal file
6
tasks/apps.py
Normal 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
3
tasks/models.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
7
tasks/tasks.py
Normal file
7
tasks/tasks.py
Normal 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
3
tasks/tests.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
3
tasks/views.py
Normal file
3
tasks/views.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
Reference in New Issue
Block a user