@app.task(rate_limit='1/s')
def task1():
print ('hi')
@app.task(rate_limit='1/s')
def task2():
print ('hello')
This code will print 1 hi/sec and 1 hello/sec. This is not what I want to do. I want to let it print 1 (hi+hello)/sec, which means giving rate limit not to each task but over multiple tasks.
It can be (0.5 hi + 0.5 hello)/sec or (0.7 hi + 0.3 hello)/sec. It depends on the rate of the tasks requested. However only one of two tasks should be done in one second.