icp/src/runner/tasks_debug.py

23 lines
436 B
Python

#!/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)