-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stopped errors for requests to create an existing tasks. #69
Conversation
Status 200 is returned instead of previously returned 409.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a typo.
docs/user_guide.md
Outdated
Once a task has been submitted, and a 201 CREATED response has been received, the npg_porch server assigns a timestamp to the task, gives it a status of `PENDING` and assigns a unique ID to it. The response from the server contains this extra information. | ||
|
||
A 200 OK response means that this particular task for this pipeline has already been registered. The current representation of the task is returned, the status of teh task might be differ from `PENDING`. Note that if there are many tasks to register, some of which were submitted previously, further work is required to make the process efficient - such as to ask the npg_porch server for a list of previously registered tasks for this pipeline. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny teh typo
src/npg_porch/db/data_access.py
Outdated
change='Created' | ||
) | ||
t.events.append(event) | ||
nested = await session.begin_nested() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
huh, I expected the subsession to be in the exception handling, but it if it works it's fine.
from npg_porch.auth.token import validate | ||
from npg_porch.db.connection import get_DbAccessor | ||
from npg_porch.models.permission import RolesEnum |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we're gradually homogenising the code module by module. It's a good thing
28639f5
to
04f1a0c
Compare
Status 200 is returned instead of previously returned 409.