简体   繁体   中英

rails admin for rake tasks

我现在有一个Rails应用程序,其中定义了数十个用于管理目的的rake任务,我希望将这些rake任务反映在一种管理界面上,因此是否有任何即插即用的解决方案或任何快速的想法?

You can get output of rake -T and then parse it with regex. ie :

all_tasks = %x(rake -T)
tasks_array = all_tasks.scan(/(rake\s[\w|:]*)/)

rake -T is quite long operation, so you may want to cache it

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM