Request a resource. Parameters ---------- user : str The user who is requesting the resource. priority : int The job priority callback : function: value->bool Callback function to receive an resource when ready
(self, user, priority, callback)
| 99 | raise NotImplementedError() |
| 100 | |
| 101 | def request(self, user, priority, callback): |
| 102 | """Request a resource. |
| 103 | |
| 104 | Parameters |
| 105 | ---------- |
| 106 | user : str |
| 107 | The user who is requesting the resource. |
| 108 | |
| 109 | priority : int |
| 110 | The job priority |
| 111 | |
| 112 | callback : function: value->bool |
| 113 | Callback function to receive an resource when ready |
| 114 | returns True if the resource is consumed. |
| 115 | """ |
| 116 | raise NotImplementedError() |
| 117 | |
| 118 | def remove(self, value): |
| 119 | """Remove a resource in the scheduler |
no outgoing calls