Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
vmdriver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
406a7949
authored
Aug 16, 2013
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding celery workers
parent
9f3a4d19
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
0 deletions
+38
-0
netcelery.py
+17
-0
vmcelery.py
+21
-0
No files found.
netcelery.py
0 → 100644
View file @
406a7949
from
celery
import
Celery
from
kombu
import
Queue
,
Exchange
from
socket
import
gethostname
HOSTNAME
=
gethostname
()
celery
=
Celery
(
'netdriver'
,
backend
=
'amqp'
,
broker
=
'amqp://cloud:test@10.9.1.31/vmdriver'
,
include
=
[
'tasks'
])
celery
.
conf
.
update
(
CELERY_QUEUES
=
(
Queue
(
HOSTNAME
+
'.net'
,
Exchange
(
'netdriver'
,
type
=
'direct'
),
routing_key
=
'netdriver'
),
)
)
vmcelery.py
0 → 100644
View file @
406a7949
from
celery
import
Celery
from
kombu
import
Queue
,
Exchange
from
socket
import
gethostname
import
os
HOSTNAME
=
gethostname
()
celery
=
Celery
(
'vmcelery'
,
backend
=
'amqp'
,
broker
=
'amqp://cloud:test@10.9.1.31/vmdriver'
,
include
=
[
'tasks'
])
celery
.
conf
.
update
(
CELERY_QUEUES
=
(
Queue
(
HOSTNAME
+
'.vm'
,
Exchange
(
'vmdriver'
,
type
=
'direct'
),
routing_key
=
"vmdriver"
),
)
)
if
os
.
getenv
(
'LIBVIRT_KEEPALIVE'
)
is
not
None
:
import
libvirt
lib_connection
=
libvirt
.
open
(
os
.
getenv
(
'LIBVIRT_URI'
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment