Skip to content
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

Attempts to create activities for agreements already terminated #291

Closed
mbenke opened this issue Mar 21, 2021 · 4 comments · Fixed by #294
Closed

Attempts to create activities for agreements already terminated #291

mbenke opened this issue Mar 21, 2021 · 4 comments · Fixed by #294
Assignees
Labels
beta.1.patch.3 bug Something isn't working

Comments

@mbenke
Copy link

mbenke commented Mar 21, 2021

Seeing this in my logs a lot:

[2021-03-21 20:35:28,847 DEBUG yapapi.events] ActivityCreateFailed(agr_id='cf6fa25bd438c213e8f8940bba164bbd1c540eee790c6b512f221edd3b5e2ce4', exc_info=(<class 'ya_activity.exceptions.ApiException'>, ApiException(), <traceback object at 0x7f300f841e10>))                      
Traceback (most recent call last):
  File "/root/miniconda3/envs/rdkit/lib/python3.7/site-packages/yapapi/executor/__init__.py", line 464, in start_worker
    act = await activity_api.new_activity(agreement.id)                                    
  File "/root/miniconda3/envs/rdkit/lib/python3.7/site-packages/yapapi/rest/activity.py", line 43, in new_activity
    activity_id = await self._api.create_activity(agreement_id)                            
  File "/root/miniconda3/envs/rdkit/lib/python3.7/site-packages/ya_activity/api_client.py",
line 205, in __call_api
    raise e
  File "/root/miniconda3/envs/rdkit/lib/python3.7/site-packages/ya_activity/api_client.py",
line 201, in __call_api
    _request_timeout=_request_timeout,
  File "/root/miniconda3/envs/rdkit/lib/python3.7/site-packages/ya_activity/rest.py", line 276, in POST
    body=body,
  File "/root/miniconda3/envs/rdkit/lib/python3.7/site-packages/ya_activity/rest.py", line 180, in request
    raise ApiException(http_resp=r)
ya_activity.exceptions.ApiException: (400)
Reason: Bad Request
HTTP response headers: <CIMultiDictProxy('Content-Length': '144', 'Content-Type': 'application/json', 'Date': 'Sun, 21 Mar 2021 19:35:28 GMT')>                                        
HTTP response body: {"message":"Bad request: Agreement cf6fa25bd438c213e8f8940bba164bbd1c540eee790c6b512f221edd3b5e2ce4 is not Approved. Current state: Terminated"} 
yapapi==0.5.2a0
yagna 0.6.1 (e1b37334 2021-03-17 build #126)
Python 3.7.9
@mbenke mbenke added the bug Something isn't working label Mar 21, 2021
@azawlocki
Copy link
Contributor

@mbenke
Copy link
Author

mbenke commented Mar 23, 2021

@mbenke
Copy link
Author

mbenke commented Mar 23, 2021

yagna_r2021-03-21_20-18-19.restart-0000.log.gz

Corresponding yagna log

@mateuszsrebrny
Copy link
Contributor

closing the issue (should be done automatically when moving to Done...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta.1.patch.3 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants