Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.toolbox
Commits
d1426e56
Commit
d1426e56
authored
6 years ago
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
promise check free disk/memory: fix 'attempt to write a readonly database'
Also set database connection timeout to 5 second
parent
8fb20de4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
slapos/promise/check_computer_memory/__init__.py
slapos/promise/check_computer_memory/__init__.py
+1
-1
slapos/promise/check_free_disk/__init__.py
slapos/promise/check_free_disk/__init__.py
+1
-1
No files found.
slapos/promise/check_computer_memory/__init__.py
View file @
d1426e56
...
...
@@ -17,7 +17,7 @@ from slapos.collect.db import Database
def
getMemoryInfo
(
database
,
time
,
date
):
memory_info
=
{}
database
=
Database
(
database
)
database
=
Database
(
database
,
create
=
False
,
timeout
=
5
)
try
:
database
.
connect
()
query_result
=
database
.
select
(
"computer"
,
date
,
"memory_size"
,
limit
=
1
)
...
...
This diff is collapsed.
Click to expand it.
slapos/promise/check_free_disk/__init__.py
View file @
d1426e56
...
...
@@ -16,7 +16,7 @@ from slapos.collect.db import Database
def
getFreeSpace
(
disk_partition
,
database
,
date
,
time
):
database
=
Database
(
database
)
database
=
Database
(
database
,
create
=
False
,
timeout
=
5
)
try
:
# fetch free disk space
database
.
connect
()
...
...
This diff is collapsed.
Click to expand it.
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