AzBuilder / terrakube

Open source IaC Automation and Collaboration Software.
https://docs.terrakube.io
Apache License 2.0
496 stars 38 forks source link

fix: correctly cancel long running jobs #1289

Closed alfespa17 closed 2 weeks ago

alfespa17 commented 2 weeks ago

This will execute and setup a quartz job when the API is starting to correctly cancel jobs that has been running for more that 6 hours, the quartz job to check inactive jobs will be executed every 5 minutes.

The logs will show something like the following:

2024-09-13T21:47:47.914Z  INFO 1 --- [           main] o.t.a.p.s.inactive.InactiveJobsService   : Setup job to cancelled inactive jobs
2024-09-13T21:47:47.916Z  INFO 1 --- [           main] o.t.a.p.s.inactive.InactiveJobsService   : Create Schedule for inactive jobs: DEFAULT.TerrakubeV2_InactiveJobs_ae638dea-dff2-459f-a9f7-549283fca505
2024-09-13T21:47:47.964Z  INFO 1 --- [           main] o.t.a.p.s.inactive.InactiveJobsService   : jobDetail is null false
2024-09-13T21:47:47.964Z  INFO 1 --- [           main] o.t.a.p.s.inactive.InactiveJobsService   : Delete Old Quartz Job for inactive jobs
2024-09-13T21:47:48.054Z  INFO 1 --- [           main] o.t.a.p.s.inactive.InactiveJobsService   : Create Schedule Job Trigger for inactive jobs DEFAULT.TerrakubeV2_InactiveJobs
sonarcloud[bot] commented 2 weeks ago

Quality Gate Passed Quality Gate passed

Issues
4 New issues
0 Accepted issues

Measures
0 Security Hotspots
51.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud