Commit 1cc03e38 authored by André Anjos's avatar André Anjos 💬

Merge branch '12-example-in-documentation-does-not-work' into 'master'

Fixed documentation and preovided default value for database in JobManager

Closes #12 

Fixed it.

See merge request !2
parents 9ade1d13 95724925
Pipeline #5156 passed with stages
in 9 minutes and 44 seconds
......@@ -15,10 +15,10 @@ submit a python script:
.. code-block:: python
import sys
from gridtk.sge import JobManager
from gridtk.sge import JobManagerSGE
from gridtk.tools import make_shell
manager = JobManager()
manager = JobManagerSGE()
command = make_shell(sys.executable, ['myscript.py', '--help'])
job = manager.submit(command)
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment