Compare commits
2 commits
65fc082b1b
...
491d8c4629
| Author | SHA1 | Date | |
|---|---|---|---|
| 491d8c4629 | |||
| 476fa9f0a3 |
5 changed files with 16 additions and 6 deletions
|
|
@ -7,14 +7,16 @@ Type=simple
|
||||||
Restart=always
|
Restart=always
|
||||||
User=pandora
|
User=pandora
|
||||||
Group=pandora
|
Group=pandora
|
||||||
|
EnvironmentFile=/srv/pandora/pandora/encoding.conf
|
||||||
PIDFile=/run/pandora/encoding.pid
|
PIDFile=/run/pandora/encoding.pid
|
||||||
WorkingDirectory=/srv/pandora/pandora
|
WorkingDirectory=/srv/pandora/pandora
|
||||||
ExecStart=/srv/pandora/bin/celery \
|
ExecStart=/srv/pandora/bin/celery \
|
||||||
-A app worker \
|
-A app worker \
|
||||||
-Q encoding -n pandora-encoding \
|
-Q encoding -n pandora-encoding \
|
||||||
--pidfile /run/pandora/encoding.pid \
|
--pidfile /run/pandora/encoding.pid \
|
||||||
--maxtasksperchild 500 \
|
-c $CONCURRENCY \
|
||||||
-l INFO
|
--maxtasksperchild $MAX_TASKS_PER_CHILD \
|
||||||
|
-l $LOGLEVEL
|
||||||
ExecReload=/bin/kill -TERM $MAINPID
|
ExecReload=/bin/kill -TERM $MAINPID
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
|
||||||
|
|
@ -7,14 +7,16 @@ Type=simple
|
||||||
Restart=always
|
Restart=always
|
||||||
User=pandora
|
User=pandora
|
||||||
Group=pandora
|
Group=pandora
|
||||||
|
EnvironmentFile=/srv/pandora/pandora/tasks.conf
|
||||||
PIDFile=/run/pandora/tasks.pid
|
PIDFile=/run/pandora/tasks.pid
|
||||||
WorkingDirectory=/srv/pandora/pandora
|
WorkingDirectory=/srv/pandora/pandora
|
||||||
ExecStart=/srv/pandora/bin/celery \
|
ExecStart=/srv/pandora/bin/celery \
|
||||||
-A app worker \
|
-A app worker \
|
||||||
-Q default,celery -n pandora-default \
|
-Q default,celery -n pandora-default \
|
||||||
--pidfile /run/pandora/tasks.pid \
|
--pidfile /run/pandora/tasks.pid \
|
||||||
--maxtasksperchild 1000 \
|
-c $CONCURRENCY \
|
||||||
-l INFO
|
--maxtasksperchild $MAX_TASKS_PER_CHILD \
|
||||||
|
-l $LOGLEVEL
|
||||||
ExecReload=/bin/kill -TERM $MAINPID
|
ExecReload=/bin/kill -TERM $MAINPID
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
|
||||||
|
|
@ -59,11 +59,11 @@ def redirect_url(request, url):
|
||||||
if settings.CONFIG['site'].get('sendReferrer', False):
|
if settings.CONFIG['site'].get('sendReferrer', False):
|
||||||
return redirect(url)
|
return redirect(url)
|
||||||
else:
|
else:
|
||||||
return HttpResponse('<script>document.location.href=%s;</script>'%json.dumps(url))
|
return HttpResponse('<script>document.location.href=%s;</script>' % json.dumps(url))
|
||||||
|
|
||||||
def opensearch_xml(request):
|
def opensearch_xml(request):
|
||||||
osd = ET.Element('OpenSearchDescription')
|
osd = ET.Element('OpenSearchDescription')
|
||||||
osd.attrib['xmlns']="http://a9.com/-/spec/opensearch/1.1/"
|
osd.attrib['xmlns'] = "http://a9.com/-/spec/opensearch/1.1/"
|
||||||
e = ET.SubElement(osd, 'ShortName')
|
e = ET.SubElement(osd, 'ShortName')
|
||||||
e.text = settings.SITENAME
|
e.text = settings.SITENAME
|
||||||
e = ET.SubElement(osd, 'Description')
|
e = ET.SubElement(osd, 'Description')
|
||||||
|
|
|
||||||
3
pandora/encoding.conf
Normal file
3
pandora/encoding.conf
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
LOGLEVEL=info
|
||||||
|
MAX_TASKS_PER_CHILD=500
|
||||||
|
CONCURRENCY=1
|
||||||
3
pandora/tasks.conf
Normal file
3
pandora/tasks.conf
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
LOGLEVEL=info
|
||||||
|
MAX_TASKS_PER_CHILD=1000
|
||||||
|
CONCURRENCY=2
|
||||||
Loading…
Add table
Add a link
Reference in a new issue