Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE3
/
storagedriver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e8338e96
authored
Jan 07, 2022
by
Kohl Krisztofer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
First 3.6 version
parent
4380caf8
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
13 deletions
+13
-13
disk.py
+3
-3
docs/install.rst
+1
-1
miscellaneous/storagecelery.conf
+3
-3
miscellaneous/storagecelery@.service
+1
-1
requirements/base.txt
+3
-3
storagecelery.py
+2
-2
No files found.
disk.py
View file @
e8338e96
...
@@ -69,7 +69,7 @@ class Disk(object):
...
@@ -69,7 +69,7 @@ class Disk(object):
def
deserialize
(
cls
,
desc
):
def
deserialize
(
cls
,
desc
):
"""Create cls object from JSON."""
"""Create cls object from JSON."""
logging
.
info
(
desc
)
logging
.
info
(
desc
)
if
isinstance
(
desc
,
basestring
):
if
isinstance
(
desc
,
str
):
desc
=
json
.
loads
(
desc
)
desc
=
json
.
loads
(
desc
)
return
cls
(
**
desc
)
return
cls
(
**
desc
)
...
@@ -93,8 +93,8 @@ class Disk(object):
...
@@ -93,8 +93,8 @@ class Disk(object):
"""Get absolute path for disk's base image."""
"""Get absolute path for disk's base image."""
return
os
.
path
.
realpath
(
self
.
dir
+
'/'
+
self
.
base_name
)
return
os
.
path
.
realpath
(
self
.
dir
+
'/'
+
self
.
base_name
)
def
__
unicode
__
(
self
):
def
__
str
__
(
self
):
return
u
'
%
s
%
s
%
s
%
s'
%
(
self
.
get_path
(),
self
.
format
,
return
'
%
s
%
s
%
s
%
s'
%
(
self
.
get_path
(),
self
.
format
,
self
.
size
,
self
.
get_base
())
self
.
size
,
self
.
get_base
())
@classmethod
@classmethod
...
...
docs/install.rst
View file @
e8338e96
...
@@ -45,7 +45,7 @@ project::
...
@@ -45,7 +45,7 @@ project::
Set up default Storage configuration and activate the virtual environment::
Set up default Storage configuration and activate the virtual environment::
$ cat >>/home/cloud/.virtualenvs/storage/bin/postactivate <<END
$ cat >>/home/cloud/.virtualenvs/storage/bin/postactivate <<END
export AMQP_URI='amqp://cloud:
password@
host:5672/circle'
export AMQP_URI='amqp://cloud:
cloud123@local
host:5672/circle'
END
END
$ workon storage
$ workon storage
$ cd ~/storagedriver
$ cd ~/storagedriver
...
...
miscellaneous/storagecelery.conf
View file @
e8338e96
...
@@ -8,8 +8,8 @@ setgid cloud
...
@@ -8,8 +8,8 @@ setgid cloud
instance
$
NAME
instance
$
NAME
script
script
cd
/
home
/
cloud
/
storagedriver
/
cd
/
home
/
kohlkriszto
/
Documents
/
storagedriver
. /
home
/
cloud
/.
virtualenvs
/
storagedriver
/
local
/
bin
/
activate
. /
home
/
kohlkriszto
/
Documents
/
storagedriver_venv
/
bin
/
activate
. /
home
/
cloud
/.
virtualenvs
/
storagedriver
/
local
/
bin
/
postactivate
. /
home
/
kohlkriszto
/
Documents
/
storagedriver_venv
/
bin
/
postactivate
exec
celery
-
A
storagecelery
worker
--
loglevel
=
info
-
n
$
NAME
exec
celery
-
A
storagecelery
worker
--
loglevel
=
info
-
n
$
NAME
end
script
end
script
miscellaneous/storagecelery@.service
View file @
e8338e96
...
@@ -12,4 +12,4 @@ Restart=always
...
@@ -12,4 +12,4 @@ Restart=always
WorkingDirectory=/home/cloud/storagedriver
WorkingDirectory=/home/cloud/storagedriver
ExecStart=/bin/bash -c "source /
etc/profile; workon storagedriver
; exec celery -A storagecelery worker --loglevel=info -n $(/bin/hostname -s).%I"
ExecStart=/bin/bash -c "source /
home/cloud/.virtualenvs/storage/bin/activate; source /home/cloud/.virtualenvs/storage/bin/postactivate
; exec celery -A storagecelery worker --loglevel=info -n $(/bin/hostname -s).%I"
requirements/base.txt
View file @
e8338e96
celery
==3.1.17
celery
requests
==2.5.3
requests
filemagic
==1.6
filemagic
storagecelery.py
View file @
e8338e96
...
@@ -22,8 +22,8 @@ celery = Celery('storagedriver',
...
@@ -22,8 +22,8 @@ celery = Celery('storagedriver',
include
=
[
'storagedriver'
])
include
=
[
'storagedriver'
])
celery
.
conf
.
update
(
celery
.
conf
.
update
(
CELERY_RESULT_BACKEND
=
'amqp'
,
CELERY_RESULT_BACKEND
=
'amqp
://
'
,
CELERY_TASK_RESULT_EXPIRES
=
300
,
CELERY_TASK_RESULT_EXPIRES
=
300
00
,
CELERY_QUEUES
=
(
CELERY_QUEUES
=
(
Queue
(
HOSTNAME
,
Exchange
(
Queue
(
HOSTNAME
,
Exchange
(
'storagedriver'
,
type
=
'direct'
),
routing_key
=
'storagedriver'
),
'storagedriver'
,
type
=
'direct'
),
routing_key
=
'storagedriver'
),
...
...
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