【发布时间】:2021-05-28 03:39:35
【问题描述】:
我需要向 Heroku 运行一个每天晚上需要为 Elasticsearch 生成索引的网络作业,我想知道是否可能。我需要在 python shell 上自动运行的命令是:
heroku run python3 manage.py shell --app My_app
from myapp.search_tasks import delete_index, create_index, index_all;
delete_index(); create_index(); index_all();
非常感谢您的帮助。
【问题讨论】:
-
您通常使用 管理命令 执行此操作:docs.djangoproject.com/en/3.1/howto/custom-management-commands/…
标签: python django postgresql elasticsearch