File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -202,11 +202,10 @@ impl Engine for EngineService {
202202 info ! ( "Aquire Task denied due to Invalid Auth" ) ;
203203 return Err ( Status :: permission_denied ( "Invalid authentication" ) ) ;
204204 } ;
205- if api
205+ if ! api
206206 . task_registry
207207 . tasks
208- . get ( & ID ( namespace, task_name) )
209- . is_none ( )
208+ . contains_key ( & ID ( namespace, task_name) )
210209 {
211210 warn ! (
212211 "Task acquisition failed - task does not exist: {}:{}" ,
@@ -285,7 +284,7 @@ impl Engine for EngineService {
285284 task_id. split ( ":" ) . collect :: < Vec < & str > > ( ) [ 0 ] . to_string ( ) ,
286285 task_id. split ( ":" ) . collect :: < Vec < & str > > ( ) [ 1 ] . to_string ( ) ,
287286 ) ;
288- let tsk_reg = self . EngineAPI . read ( ) . await . task_registry . get ( & id) ;
287+ let tsk_reg = api . task_registry . get ( & id) ;
289288 if let Some ( tsk_reg) = tsk_reg {
290289 if !tsk_reg. clone ( ) . verify ( task. task_payload . clone ( ) ) {
291290 warn ! ( "Failed to parse given task bytes" ) ;
You can’t perform that action at this time.
0 commit comments