bugfix
This commit is contained in:
parent
8fceb51842
commit
e27f743cce
@ -112,7 +112,7 @@ class FlowEngine:
|
|||||||
self.aio = []
|
self.aio = []
|
||||||
cnt = 0
|
cnt = 0
|
||||||
while True:
|
while True:
|
||||||
async with (env, 'workflow') as sor:
|
async with get_sor_context(env, 'dagflow') as sor:
|
||||||
self.aio = await sor.R('flow_instance', {'status': 'running'})
|
self.aio = await sor.R('flow_instance', {'status': 'running'})
|
||||||
if cnt >= 60:
|
if cnt >= 60:
|
||||||
debug(f'{self.aio=}')
|
debug(f'{self.aio=}')
|
||||||
@ -124,7 +124,7 @@ class FlowEngine:
|
|||||||
|
|
||||||
async def create_definition(self, org_id, name, version, dsl_text):
|
async def create_definition(self, org_id, name, version, dsl_text):
|
||||||
env = ServerEnv()
|
env = ServerEnv()
|
||||||
async with (env, 'workflow') as sor:
|
async with get_sor_context(env, 'dagflow') as sor:
|
||||||
fid = env.uuid()
|
fid = env.uuid()
|
||||||
await sor.C('flow_definition', {
|
await sor.C('flow_definition', {
|
||||||
'id': fid,
|
'id': fid,
|
||||||
@ -238,7 +238,7 @@ class FlowEngine:
|
|||||||
|
|
||||||
async def list_human_tasks(self, org_id, user_roles):
|
async def list_human_tasks(self, org_id, user_roles):
|
||||||
env = ServerEnv()
|
env = ServerEnv()
|
||||||
async with (env, 'workflow') as sor:
|
async with get_sor_context(env, 'dagflow') as sor:
|
||||||
return await sor.R('human_task', {
|
return await sor.R('human_task', {
|
||||||
'org_id': org_id,
|
'org_id': org_id,
|
||||||
'status': 'pending',
|
'status': 'pending',
|
||||||
@ -247,7 +247,7 @@ class FlowEngine:
|
|||||||
|
|
||||||
async def complete_human_task(self, org_id, task_id, user_id, output):
|
async def complete_human_task(self, org_id, task_id, user_id, output):
|
||||||
env = ServerEnv()
|
env = ServerEnv()
|
||||||
async with (env, 'workflow') as sor:
|
async with get_sor_context(env, 'dagflow') as sor:
|
||||||
rows = await sor.R('human_task', {
|
rows = await sor.R('human_task', {
|
||||||
'id': task_id,
|
'id': task_id,
|
||||||
'org_id': org_id,
|
'org_id': org_id,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user