Linux 使用heroku调度器调度websolr重新索引
我在Heroku的Schedule应用程序中有一个Schedule命令,用于重建websolr索引Linux 使用heroku调度器调度websolr重新索引,linux,django,heroku,django-haystack,websolr,Linux,Django,Heroku,Django Haystack,Websolr,我在Heroku的Schedule应用程序中有一个Schedule命令,用于重建websolr索引 heroku run python manage.py rebuild_index 问题是,该命令需要用户的输入,因此它永远不会自动成功运行 WARNING: This will irreparably remove EVERYTHING from your search index in connection 'default'. Your choices after this are to
heroku run python manage.py rebuild_index
问题是,该命令需要用户的输入,因此它永远不会自动成功运行
WARNING: This will irreparably remove EVERYTHING from your search index in connection 'default'.
Your choices after this are to restore from backups or rebuild via the `rebuild_index` command.
Are you sure you wish to continue? [y/N]
有没有其他方法可以使用Heroku Scheduler应用程序重建我的索引,或者有没有其他方法可以在命令中自动发出“y”信号,以便在Scheduler中使用我的命令定期生成索引?找到了答案,添加了“是”命令就成功了 您可以将
--noinput
参数传递给rebuild命令,如下所示:
heroku运行python manage.py重建索引--noinput
有关更多选项,请参阅
heroku run 'yes | python manage.py rebuild_index'