from celery.decorators import task
from celery.decorators import task
@task()
def add(x, y):
r = open("./abc.txt","w")
r.write("sdf")
r.close()
return x + y
That's my tasks.py file.
>>> import tasks
>>> r = tasks.add.delay(3,5)
>>> r.result
8
As you can see, the function works. However, the file does not create. Why?
I've tried changing multiple file paths, due to possible permission issues. but no luck.