Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
vmdriver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9bdb329a
authored
Oct 20, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vmdriver: add git repository info to the get_info method
parent
308b9e03
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletions
+14
-1
requirements/base.txt
+1
-0
vmdriver.py
+13
-1
No files found.
requirements/base.txt
View file @
9bdb329a
...
@@ -4,3 +4,4 @@ lxml==3.2.3
...
@@ -4,3 +4,4 @@ lxml==3.2.3
psutil==1.1.3
psutil==1.1.3
Pillow==2.3.0
Pillow==2.3.0
pylibmc==1.2.3
pylibmc==1.2.3
GitPython
vmdriver.py
View file @
9bdb329a
...
@@ -619,10 +619,22 @@ def get_ram_size():
...
@@ -619,10 +619,22 @@ def get_ram_size():
@celery.task
@celery.task
def
get_driver_version
():
from
git
import
Repo
repo
=
Repo
(
path
=
os
.
getcwd
())
lc
=
repo
.
log
()[
0
]
return
{
'branch'
:
repo
.
active_branch
,
'commit'
:
lc
.
id_abbrev
,
'commit_text'
:
lc
.
summary
,
'is_dirty'
:
repo
.
is_dirty
}
@celery.task
def
get_info
():
def
get_info
():
return
{
'core_num'
:
get_core_num
(),
return
{
'core_num'
:
get_core_num
(),
'ram_size'
:
get_ram_size
(),
'ram_size'
:
get_ram_size
(),
'architecture'
:
get_architecture
()}
'architecture'
:
get_architecture
(),
'driver_version'
:
get_driver_version
()}
@celery.task
@celery.task
...
...
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