Django server stuck on Beanstalkd
I'm trying to setup a django server with existing code. But I seemed to be stuck on this while trying to start server using python manage.py runserver
this the traceback:
(camdyvirtualenv) Mac-mini-3:big-picture-api Sqooge_Ahmed$ python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/Sqooge_Ahmed/Documents/Django/camdyvirtualenv/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "/Users/Sqooge_Ahmed/Documents/Django/camdyvirtualenv/lib/python2.7/site-packages/django/core/management/__init__.py", line 303, in execute
settings.INSTALLED_APPS
File "/Users/Sqooge_Ahmed/Documents/Django/camdyvirtualenv/lib/python2.7/site-packages/django/conf/__init__.py", line 48, in __getattr__
self._setup(name)
File "/Users/Sqooge_Ahmed/Documents/Django/camdyvirtualenv/lib/python2.7/site-packages/django/conf/__init__.py", line 44, in _setup
self._wrapped = Settings(settings_module)
File "/Users/Sqooge_Ahmed/Documents/Django/camdyvirtualenv/lib/python2.7/site-packages/django/conf/__init__.py", line 92, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/Users/Sqooge_Ahmed/Documents/Django/camdyvirtualenv/Camdy-APIs/big-picture-api/bigpicture/settings.py", line 5, in <module>
from pystalkd.Beanstalkd import Connection as beanstalkdConnect
File "/Users/Sqooge_Ahmed/Documents/Django/camdyvirtualenv/lib/python2.7/site-packages/pystalkd/__init__.py", line 20, in <module>
from . import Beanstalkd, Job
File "/Users/Sqooge_Ahmed/Documents/Django/camdyvirtualenv/lib/python2.7/site-packages/pystalkd/Beanstalkd.py", line 156
def send_command(self, command, *args, ok_status=None, error_status=None):
^
SyntaxError: invalid syntax
Asked by: Stuart918 | Posted: 27-01-2022
Answer 1
In Python 2 you should to set default arguments before *args:
def send_command(self, command, ok_status=None, error_status=None, *args):
Answered by: Daryl808 | Posted: 28-02-2022
Similar questions
python - Celery or beanstalkd or both?
I know (but I do not understand) that Celery can use Beanstalk as delivery mechanism.
From the Beanstalkd Homepage
"Beanstalk is a simple, fast work queue."
From the Celery Homepage
"It’s a task queue with focus on real-time processing, while also supporting task scheduling."
That seems pretty simi...
BeanStalkd on Solaris doesnt return anything when called from the python library
i am using Solaris 10 OS(x86). i installed beanstalkd and it starts fine by using command "beanstalkd -d -l hostip -p 11300".
i have Python 2.4.4 on my system i installed YAML and beanstalkc python libraries to connect beanstalkd with python my problem is when i try to write some code:
import beanstalkc
beanstalk = beanstalkc.Connection(host='hostip', port=11300)
no error so far but when i try to ...
python - Celery or beanstalkd or both?
I know (but I do not understand) that Celery can use Beanstalk as delivery mechanism.
From the Beanstalkd Homepage
"Beanstalk is a simple, fast work queue."
From the Celery Homepage
"It’s a task queue with focus on real-time processing, while also supporting task scheduling."
That seems pretty simi...
python - Getting jobs from beanstalkd - timed out exception
I am using Python 2.7, beanstalkd server with beanstalkc as the client library.
It takes about 500 to 1500 ms to process each job, depending on the size of the job.
I have a cron job that will keep adding jobs to the beanstalkd queue and a "worker" that will run in an infinite loop getting jobs and processing them.
eg:
def ge...
python - how to use callback in beanstalkd ?
There is 3 machines and one publisher, two consumers.
I am using golang to publish order to some machine.
And the machine is used python to be consumer.
I want to know how can I get the result that the order is finished or failed in publisher.
And if the order is not belong to machine one, what should i do?
release or bury it?
python:
consumer:
import beanstalkc
def get_beanstalk_data(c...
Still can't find your answer? Check out these communities...
PySlackers | Full Stack Python | NHS Python | Pythonist Cafe | Hacker Earth | Discord Python