Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
gridtk
Commits
95724925
Commit
95724925
authored
Oct 25, 2016
by
Manuel Günther
Browse files
Fixed documentation and preovided default value for database in JobManager
parent
9ade1d13
Pipeline
#5104
passed with stages
in 8 minutes and 39 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
doc/program.rst
View file @
95724925
...
...
@@ -15,10 +15,10 @@ submit a python script:
.. code-block:: python
import sys
from gridtk.sge import JobManager
from gridtk.sge import JobManager
SGE
from gridtk.tools import make_shell
manager = JobManager()
manager = JobManager
SGE
()
command = make_shell(sys.executable, ['myscript.py', '--help'])
job = manager.submit(command)
...
...
gridtk/manager.py
View file @
95724925
...
...
@@ -15,7 +15,7 @@ from distutils.version import LooseVersion
class
JobManager
:
"""This job manager defines the basic interface for handling jobs in the SQL database."""
def
__init__
(
self
,
database
,
wrapper_script
=
None
,
debug
=
False
):
def
__init__
(
self
,
database
=
'submitted.sql3'
,
wrapper_script
=
None
,
debug
=
False
):
self
.
_database
=
os
.
path
.
realpath
(
database
)
self
.
_engine
=
sqlalchemy
.
create_engine
(
"sqlite:///"
+
self
.
_database
,
connect_args
=
{
'timeout'
:
600
},
echo
=
debug
)
self
.
_session_maker
=
sqlalchemy
.
orm
.
sessionmaker
(
bind
=
self
.
_engine
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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