package Ġcom . tencent . devops . schedule . web Ċ Ċ import Ġcom . tencent . devops . schedule . api . Server Rpc Client Ċ import Ġcom . tencent . devops . schedule . constants . RPC _ HE ART _ BE AT Ċ import Ġcom . tencent . devops . schedule . constants . RPC _ SUBMIT _ RESULT Ċ import Ġcom . tencent . devops . schedule . constants . SERVER _ BASE _ PATH Ċ import Ġcom . tencent . devops . schedule . constants . SERVER _ RPC _ V 1 Ċ import Ġcom . tencent . devops . schedule . manager . Job Manager Ċ import Ġcom . tencent . devops . schedule . manager . Worker Manager Ċ import Ġcom . tencent . devops . schedule . pojo . job . Job Execution Result Ċ import Ġcom . tencent . devops . schedule . pojo . trigger . Heart Beat Param Ċ import Ġorg . springframework . web . bind . annotation . PostMapping Ċ import Ġorg . springframework . web . bind . annotation . RequestBody Ċ import Ġorg . springframework . web . bind . annotation . RequestMapping Ċ import Ġorg . springframework . web . bind . annotation . RestController Ċ Ċ @ RestController Ċ @ RequestMapping ("$ SERVER _ BASE _ PATH $ SERVER _ RPC _ V 1 ") Ċ class ĠServer Rpc Controller ( ĊĠĠĠ Ġprivate Ġval Ġjob Manager : ĠJob Manager , ĊĠĠĠ Ġprivate Ġval Ġworker Manager : ĠWorker Manager Ċ ) Ġ: ĠServer Rpc Client Ġ{ ĊĊĠĠĠ Ġ@ PostMapping ( RPC _ SUBMIT _ RESULT ) ĊĠĠĠ Ġoverride Ġfun Ġsubmit Result (@ RequestBody Ġresult : ĠJob Execution Result ) Ġ{ ĊĠĠĠĠĠĠĠ Ġwith ( result ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġjob Manager . complete Job ( log Id . or Empty (), Ġcode , Ġmessage ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ PostMapping ( RPC _ HE ART _ BE AT ) ĊĠĠĠ Ġoverride Ġfun Ġheart Beat (@ RequestBody Ġparam : ĠHeart Beat Param ) Ġ{ ĊĠĠĠĠĠĠĠ Ġworker Manager . worker Heartbeat ( param ) ĊĠĠĠ Ġ} Ċ } Ċ