I decided to maintain separate queue for tasks in Redis. When I send new task to Celery, I also add it to Redis list. When task is running, it determines what it must do: A or B depends on current system state.
Solution does not look great, but I hope that will not cause problems.