mirror of
https://github.com/wassname/ray.git
synced 2026-07-05 23:12:30 +08:00
TaskCancellation (#7669)
* Smol comment * WIP, not passing ray.init * Fixed small problem * wip * Pseudo interrupt things * Basic prototype operational * correct proc title * Mostly done * Cleanup * cleaner raylet error * Cleaning up a few loose ends * Fixing Race Conds * Prelim testing * Fixing comments and adding second_check for kill * Working_new_impl * demo_ready * Fixing my english * Fixing a few problems * Small problems * Cleaning up * Response to changes * Fixing error passing * Merged to master * fixing lock * Cleaning up print statements * Format * Fixing Unit test build failure * mock_worker fix * java_fix * Canel * Switching to Cancel * Responding to Review * FixFormatting * Lease cancellation * FInal comments? * Moving exist check to CoreWorker * Fix Actor Transport Test * Fixing task manager test * chaning clock repr * Fix build * fix white space * lint fix * Updating to medium size * Fixing Java test compilation issue * lengthen bad timeouts
This commit is contained in:
@@ -16,6 +16,23 @@ class RayConnectionError(RayError):
|
||||
pass
|
||||
|
||||
|
||||
class RayCancellationError(RayError):
|
||||
"""Raised when this task is cancelled.
|
||||
|
||||
Attributes:
|
||||
task_id (TaskID): The TaskID of the function that was directly
|
||||
cancelled.
|
||||
"""
|
||||
|
||||
def __init__(self, task_id=None):
|
||||
self.task_id = task_id
|
||||
|
||||
def __str__(self):
|
||||
if self.task_id is None:
|
||||
return "This task or its dependency was cancelled by"
|
||||
return "Task: " + str(self.task_id) + " was cancelled"
|
||||
|
||||
|
||||
class RayTaskError(RayError):
|
||||
"""Indicates that a task threw an exception during execution.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user