pyl
This commit is contained in:
parent
77aa32646a
commit
978849d379
|
@ -1301,6 +1301,7 @@ def task_list_for_my_open_processes(
|
|||
|
||||
|
||||
def task_list_for_me(page: int = 1, per_page: int = 100) -> flask.wrappers.Response:
|
||||
"""Task_list_for_me."""
|
||||
return get_tasks(
|
||||
processes_started_by_user=False,
|
||||
has_lane_assignment_id=False,
|
||||
|
@ -1310,17 +1311,22 @@ def task_list_for_me(page: int = 1, per_page: int = 100) -> flask.wrappers.Respo
|
|||
|
||||
|
||||
def task_list_for_my_groups(
|
||||
group_identifier: str = None,
|
||||
page: int = 1, per_page: int = 100
|
||||
group_identifier: Optional[str] = None, page: int = 1, per_page: int = 100
|
||||
) -> flask.wrappers.Response:
|
||||
return get_tasks(group_identifier=group_identifier, processes_started_by_user=False, page=page, per_page=per_page)
|
||||
"""Task_list_for_my_groups."""
|
||||
return get_tasks(
|
||||
group_identifier=group_identifier,
|
||||
processes_started_by_user=False,
|
||||
page=page,
|
||||
per_page=per_page,
|
||||
)
|
||||
|
||||
|
||||
def task_list_user_groups(
|
||||
) -> flask.wrappers.Response:
|
||||
def task_list_user_groups() -> flask.wrappers.Response:
|
||||
"""Task_list_user_groups."""
|
||||
groups = g.user.groups
|
||||
# TODO: filter out the default group and have a way to know what is the default group
|
||||
group_identifiers = [i.identifier for i in groups if i.identifier != 'everybody']
|
||||
group_identifiers = [i.identifier for i in groups if i.identifier != "everybody"]
|
||||
return make_response(jsonify(sorted(group_identifiers)), 200)
|
||||
|
||||
|
||||
|
@ -1329,7 +1335,7 @@ def get_tasks(
|
|||
has_lane_assignment_id: bool = True,
|
||||
page: int = 1,
|
||||
per_page: int = 100,
|
||||
group_identifier: str = None,
|
||||
group_identifier: Optional[str] = None,
|
||||
) -> flask.wrappers.Response:
|
||||
"""Get_tasks."""
|
||||
user_id = g.user.id
|
||||
|
|
|
@ -7,6 +7,7 @@ from spiffworkflow_backend.services.git_service import GitService
|
|||
|
||||
|
||||
class TestGitService(BaseTest):
|
||||
"""TestGitService."""
|
||||
|
||||
def test_strips_output_of_stdout_from_command(
|
||||
self,
|
||||
|
@ -14,5 +15,8 @@ class TestGitService(BaseTest):
|
|||
client: FlaskClient,
|
||||
with_db_and_bpmn_file_cleanup: None,
|
||||
) -> None:
|
||||
output = GitService.run_shell_command_to_get_stdout(["echo", ' This output should not end in space or newline \n'])
|
||||
assert output == 'This output should not end in space or newline'
|
||||
"""Test_strips_output_of_stdout_from_command."""
|
||||
output = GitService.run_shell_command_to_get_stdout(
|
||||
["echo", " This output should not end in space or newline \n"]
|
||||
)
|
||||
assert output == "This output should not end in space or newline"
|
||||
|
|
|
@ -203,10 +203,10 @@ export const refreshAtInterval = (
|
|||
timeout: number,
|
||||
func: Function
|
||||
) => {
|
||||
// const intervalRef = setInterval(() => func(), interval * 1000);
|
||||
// const timeoutRef = setTimeout(
|
||||
// () => clearInterval(intervalRef),
|
||||
// timeout * 1000
|
||||
// );
|
||||
// return [intervalRef, timeoutRef];
|
||||
const intervalRef = setInterval(() => func(), interval * 1000);
|
||||
const timeoutRef = setTimeout(
|
||||
() => clearInterval(intervalRef),
|
||||
timeout * 1000
|
||||
);
|
||||
return [intervalRef, timeoutRef];
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue