cleaning for initial pull request
This commit is contained in:
Binary file not shown.
@@ -25,8 +25,7 @@ from oslo.config import cfg
|
||||
|
||||
db_opts = [
|
||||
cfg.StrOpt('sql_connection',
|
||||
default='sqlite:///~/Documents/test.db',
|
||||
# default='mysql://task:flow@localhost/taskflow',
|
||||
default='mysql://task:flow@localhost/taskflow',
|
||||
help='The SQLAlchemy connection string used to connect to the '
|
||||
'database'),
|
||||
cfg.IntOpt('sql_idle_timeout',
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -33,31 +33,3 @@ def model_query(context, *args, **kwargs):
|
||||
query = session.query(*args)
|
||||
|
||||
return query
|
||||
|
||||
def workflow_get(context, workflow_id):
|
||||
"""Return one workflow with matching workflow_id"""
|
||||
result = model_query(context, models.Workflow).get(workflow_id)
|
||||
|
||||
if not result:
|
||||
raise exception.NotFound("No workflow found "
|
||||
"with id %s." % (workflow_id,))
|
||||
|
||||
def workflow_get_all(context):
|
||||
"""Return all workflows"""
|
||||
results = model_query(context, models.Workflow).all()
|
||||
|
||||
if not results:
|
||||
raise exception.NotFound("No workflows were found.")
|
||||
|
||||
return results
|
||||
|
||||
def workflow_get_names(context):
|
||||
"""Return all workflow names"""
|
||||
results = model_auery(context, models.Workflow.name).all()
|
||||
|
||||
return zip(*results)
|
||||
|
||||
def workflow_create(context, workflow_id):
|
||||
"""Create new workflow with workflow_id"""
|
||||
|
||||
|
||||
|
||||
@@ -18,13 +18,8 @@
|
||||
# under the License.
|
||||
"""
|
||||
SQLAlchemy models for taskflow data.
|
||||
|
||||
NOTE: WFs cannot currently be re-used in a single logbook or job, but can be re-used across
|
||||
multiple logbooks and jobs
|
||||
"""
|
||||
|
||||
import logging
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
from sqlalchemy import Column, Integer, String, Table
|
||||
|
||||
Reference in New Issue
Block a user