treasure-data / digdag

Workload Automation System
https://www.digdag.io/
Apache License 2.0
1.31k stars 222 forks source link

[feature request] kill arbitrary attempt #1103

Open 2GMon opened 5 years ago

2GMon commented 5 years ago

Are there any way to kill queued attempts? I want to cancel my backfill command so I want to kill all attempts generated by the backfill command, but I coudn't find a way to kill queued attempts.

When i try to kill an queued attempts with api/attempts/{id}/kill the response is as follows,

{
    "message": "Session attempt already killed or finished",
    "status": 409
}

I can only kill an running attempt with api/attempts/{id}/kill.

mocyuto commented 2 years ago

I supposed that if condition n > 0 made it blocked killing attempts. I would think n > 0 can be removed. Whether or not task was killed, I thought it would not be affected sessions.

https://github.com/treasure-data/digdag/blob/a1d842cbc21eb2e076ea46c6a4e4ae37a7dd5d7e/digdag-core/src/main/java/io/digdag/core/database/DatabaseSessionStoreManager.java#L437