# Move pending tasks to a different task queue

**URL:** <https://community.temporal.io/t/move-pending-tasks-to-a-different-task-queue/13671>\
**Category:** Community Support\
**Tags:** python-sdk\
**Created:** [September 26, 2024, 8:55pm UTC](https://community.temporal.io/t/move-pending-tasks-to-a-different-task-queue/13671 "2024-09-26T20:55:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vikas\_Unnava](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/vikas_unnava/32/5908_2.png) [@Vikas\_Unnava](https://community.temporal.io/u/Vikas_Unnava)\
**Post date:** [September 26, 2024, 8:55pm UTC](https://community.temporal.io/t/move-pending-tasks-to-a-different-task-queue/13671/1 "2024-09-26T20:55:21Z")

</div>

We have a use case where we have a need for prioritized activity execution. I understand that temporal doesnt support priority in the task queues. So, we are trying to use multiple task queues one per priority.

However, once in a while we will need to reprioritize pending activities(ones waiting in the task queue). My original idea was to cancel the activities and reschedule them on a different task queue when I receive the signal in the workflow, but this approach also cancels running activities which we dont want. We only want to move the activities that havent been picked up by a worker yet.

Really appreciate the help and hoping for a workaround.

---

<div class="post-metadata">

**Author:** ![maxim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/maxim/32/8_2.png) [@maxim](https://community.temporal.io/u/maxim)\
**Post date:** [September 27, 2024, 4:41pm UTC](https://community.temporal.io/t/move-pending-tasks-to-a-different-task-queue/13671/2 "2024-09-27T16:41:38Z")

</div>

A workaround is for this activity to send a signal to a workflow at the beginning of the execution.

---

<div class="post-metadata">

**Author:** ![Vikas\_Unnava](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/vikas_unnava/32/5908_2.png) [@Vikas\_Unnava](https://community.temporal.io/u/Vikas_Unnava)\
**Post date:** [October 1, 2024, 4:32pm UTC](https://community.temporal.io/t/move-pending-tasks-to-a-different-task-queue/13671/3 "2024-10-01T16:32:10Z")

</div>

> [@Vikas\_Unnava](#):
>
> However, once in a while we will need to reprioritize pending activities(ones waiting in the task queue). My original idea was to cancel the activities and reschedule them on a different task queue when I receive the signal in the workflow, but this approach also cancels running activities which we dont want. We only want to move the activities that havent been picked up by a worker yet.

Interesting! Very helpful, thanks!

---

<div class="post-metadata">

**Author:** ![maxim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/maxim/32/8_2.png) [@maxim](https://community.temporal.io/u/maxim)\
**Post date:** [October 1, 2024, 4:43pm UTC](https://community.temporal.io/t/move-pending-tasks-to-a-different-task-queue/13671/4 "2024-10-01T16:43:44Z")

</div>

> this approach also cancels running activities which we dont want.

Activities can ignore the cancellation requests. If they don’t heartbeat, they will not receive the cancellation request anyway.
