如何从Rundeck删除旧的执行和作业

时间:2019-10-04 07:43:30

标签: rundeck

我在阳台上有30000多个工作和执行。是否有任何API或CLI,以便我们可以安排定期清洁。由于太多的工作和执行,流浪者抛出java.lang.OutOfMemoryError: GC Overhead Limit并且服务停止。

如果还有更多号码。 UI需要很长时间来呈现信息。

任何文档或脚本都会有所帮助。

2 个答案:

答案 0 :(得分:0)

使用RD CLI,您有一个不错的选择:https://gist.github.com/shamil/1f6524f06210252c7d13d0deb169bdc2如果您使用的是Rundeck 3.1,则可以转到“项目设置”>“编辑配置”>“执行历史记录清理”(选项卡),然后单击“启用”复选框(然后您可以在同一页面中定义参数。

答案 1 :(得分:0)

如果您的项目只有一个,则不必运行上面的脚本。

转到项目,单击public static void userInput() { var FACTS = new Dictionary<string, bool>(); Console.WriteLine("\n Which of these medical conditions do you have? Please type the corresponding number:" + "\n 1. headache \n 2. vomiting \n 3. cramp \n 4. rash \n 5. cough \n 6. fatigue \n 7. nausea \n 8. dizziness" + "\n 9. cold \n 10. chestPain \n 11. infection \n 12. flu \n 13. healthy \n 14. prescribeAntibiotics \n" + " 15. prescribePainkillers \n 16. gastroenteritis"); bool loop = true; while (loop == true) { bool valid = false; while (valid == false) { string StringInput = Console.ReadLine(); int input = 0; if (int.TryParse(StringInput, out input)) { valid = true; switch (input) { case 1: FACTS["headache"] = true; break; case 2: FACTS["vomiting"] = true; break; case 3: FACTS["cramp"] = true; break; case 4: FACTS["rash"] = true; break; case 5: FACTS["cough"] = true; break; case 6: FACTS["fatigue"] = true; break; case 7: FACTS["nausea"] = true; break; case 8: FACTS["dizziness"] = true; break; case 9: FACTS["cold"] = true; break; case 10: FACTS["chestPain"] = true; break; case 11: FACTS["infection"] = true; break; case 12: FACTS["flu"] = true; break; case 13: FACTS["healthy"] = true; break; case 14: FACTS["prescribeAntibiotics"] = true; break; case 15: FACTS["prescribePainkillers"] = true; break; case 16: FACTS["gastroenteritis"] = true; break; default: Console.WriteLine("Sorry, please enter a number."); valid = false; break; } if (valid == true) { bool done = false; while (done == false) { Console.WriteLine("Thank you, Any other conditions? Y or N"); string temp = Console.ReadLine(); temp = Convert.ToString(temp); switch (temp.ToUpper()) { case "Y": done = true; loop = true; break; case "N": done = true; loop = false; break; } } } } } } } recentfailed标签,然后执行running