icp/src/runner/tasks_debug.py

23 lines
436 B
Python
Raw Normal View History

2018-05-05 22:18:02 +00:00
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from runner.celery import app
###############################################################################
# Celery testing
###############################################################################
@app.task
def add(x, y):
print("add was called:", x, y)
return x + y
@app.task
def mul(x, y):
return x * y
@app.task
def xsum(numbers):
return sum(numbers)