与Django uwsgi spooler函数不存在关系

2024-06-12 12:10:25 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在运行一个使用uwsgi的django1.8应用程序。我正在尝试使用@spool decorator在后台处理程序中运行一个函数。功能是向我的模型添加数据。你知道吗

但是当spooler函数试图保存一个对象时,我得到了这个错误:

psycopg2.ProgrammingError: relation "bgsite_person" does not exist
LINE 1: UPDATE "bgsite_person" SET "title" = NULL, "first_names" = N...

这是我的uwsgi配置文件:

[uwsgi]
http = :8000
module = BGMS.wsgi:application
chdir = /home/pete/GitHub/BGMS/BGMS
check-static = /home/pete/GitHub/BGMS/BGMS/BGMS/build/
home = /home/pete/.virtualenvs/bgms
env = DJANGO_SETTINGS_MODULE=BGMS.settings.development

master = true
processes = 4
threads = 1
lazy-apps = 1

spooler = /home/pete/Documents/
shared-import = /home/pete/GitHub/BGMS/BGMS/bgsite/spooler_functions.py

我在一个普通的worker中运行这个函数没有问题。你知道吗

有什么想法吗?谢谢。你知道吗


Tags: 函数功能github应用程序处理程序homedecoratoruwsgi