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

WIP: Add DEBUG prints to MuseumPlus PUT request #8

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

suutari-ai
Copy link
Member

@suutari-ai suutari-ai commented Dec 18, 2024

This is not really code that I want to include to master, but just using PR as place to store some of my debugging code and for documenting the issue.

This request used to fail when the field name was not set correctly, but even after setting the correct(?) field name it still doesn't seem to save the data to MuseumPlus. The response to the PUT request was HTTP code 204 (with no content) so it should have succeeded, but still the field (ObjPASLog01Clb) seems to be empty on MuseumPlus.

This request used to fail when the field name was not set correctly, but
even after setting the correct(?) field name it still doesn't seem to
save the data to MuseumPlus.  The response to the PUT request was HTTP
code 204 (with no content) so it should have succeeded, but still the
field (`ObjPASLog01Clb`) seems to be empty on MuseumPlus.
@suutari-ai
Copy link
Member Author

Here's a dump from my console about the succeeded PUT request, which still didn't seem to change the field value on MuseumPlus:

07:50:06 *** Listening on confirm_sip...                                                                                                                                                                                                                       
07:50:06 Cleaning registries for queue: confirm_sip                                                                                                                                                                                                            
07:50:06 confirm_sip: passari_workflow.jobs.confirm_sip.confirm_sip(object_id=822184, sip_id='20241218-074708') (confirm_sip_822184)                                                                                                                           
Confirming SIP 20240614_Object_822184-20241218-074708.tar                                                                                                                                                                                                      
DEBUG:asyncio:Using selector: EpollSelector                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                               
Workers started:                                                                                                                                                                                                                                               
[1]   5329 Running                 rq worker download_object &                                                                                                                                                                                                 
[2]   5330 Running                 rq worker create_sip &                                                                                                                                                                                                      
[3]-  5331 Running                 rq worker submit_sip &                                                                                                                                                                                                      
[4]+  5332 Running                 rq worker confirm_sip &                                                                                                                                                                                                     
                                                                                                                                                                                                                                                               
Press Ctrl+C to shutdown the workers.                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                               
SUCCESS=============================================                                                                                                                                                                                                           
Input URL: https://mpfinlandfhatest.zetcom.app/ria-ws/application/module/Object/822184/ObjPASLog01Clb                                                                                                                                                          
Input data: <?xml version='1.0' encoding='utf-8'?>                                                                                                                                                                                                             
<application xmlns="http://www.zetcom.com/ria/ws/module">                                                                                                                                                                                                      
  <modules>                                                                                                                                                                                                                                                    
    <module name="Object">                                                                                                                                                                                                                                     
      <moduleItem id="822184">                                                                                                                                                                                                                                 
      <dataField name="ObjPASLog01Clb"><value>[{"filename": "20240614_Object_822184-20241218-074708.tar", "status": "rejected", "object_modify_date": "2024-06-14T11:34:12.406000+00:00", "date": "2024-12-18T07:50:07.031290+00:00"}]</value></dataField></mod
uleItem>                                                                                                                                                                                                                                                       
    </module>                                                                                                                                                                                                                                                  
</modules>                                                                                                                                                                                                                                                     
</application>                                                                                                                                                                                                                                                 
response: <ClientResponse(https://mpfinlandfhatest.zetcom.app/ria-ws/application/module/Object/822184/ObjPASLog01Clb) [204 No Content]>                                                                                                                        
<CIMultiDictProxy('Date': 'Wed, 18 Dec 2024 07:50:08 GMT', 'Connection': 'keep-alive', 'Server': 'nginx', 'X-Content-Type-Options': 'nosniff', 'Content-Security-Policy': "default-src 'self'; script-src 'unsafe-inline' 'unsafe-eval' 'self'; style-src 'unsa
fe-inline' 'self'; img-src 'self' https://*.openstreetmap.org blob:; frame-src *", 'X-Frame-Options': 'sameorigin', 'Strict-Transport-Security': 'max-age=63072000; includeSubDomains; preload')>                                                              
                                                                                                                                                                                                                                                               
Response content:                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                               
Finished confirming SIP 20240614_Object_822184-20241218-074708.tar                                                                                                                                                                                             
ERROR:asyncio:Unclosed client session                                                                                                                                                                                                                          
client_session: <aiohttp.client.ClientSession object at 0x7b73af8dd0d0>                                                                                                                                                                                        
ERROR:asyncio:Unclosed connector                                                                                                                                                                                                                               
connections: ['deque([(<aiohttp.client_proto.ResponseHandler object at 0x7b73ad8e1cd0>, 3739009.685787987)])']                                                                                                                                                 
connector: <aiohttp.connector.TCPConnector object at 0x7b73ad8ea810>                                                                                                                                                                                           
SIP 20240614_Object_822184-20241218-074708.tar confirmed                                                                                                                                                                                                       
07:50:08 confirm_sip: Job OK (confirm_sip_822184)                                                                                                                                                                                                              
INFO:rq.worker:confirm_sip: Job OK (confirm_sip_822184)                                                                                                                                                                                                        
07:50:08 Result is kept for 500 seconds                                                                                                                                                                                                                        
INFO:rq.worker:Result is kept for 500 seconds                                                                                                                                                                                                                  
08:03:36 Cleaning registries for queue: submit_sip                                                                             
08:03:36 Cleaning registries for queue: download_object                                                                        
08:03:36 Cleaning registries for queue: create_sip                                                                             
08:03:38 Cleaning registries for queue: confirm_sip                                                                            
^C08:08:29 Worker df8a0be8df5e4eabbd111c3710e01bda [PID 5331]: warm shut down requested
08:08:29 Worker 07c10b5059f94058b184d4a71d77d442 [PID 5332]: warm shut down requested
08:08:29 Worker b063f1d0a76c47e9b0a618ee7b34739c [PID 5329]: warm shut down requested
08:08:29 Worker 7e2550500ffa491db23426b1b69125f6 [PID 5330]: warm shut down requested

[appuser@a1ad95813f25 passari-workflow]$ 08:08:29 Unsubscribing from channel rq:pubsub:b063f1d0a76c47e9b0a618ee7b34739c
08:08:29 Unsubscribing from channel rq:pubsub:df8a0be8df5e4eabbd111c3710e01bda
08:08:29 Unsubscribing from channel rq:pubsub:7e2550500ffa491db23426b1b69125f6
08:08:29 Unsubscribing from channel rq:pubsub:07c10b5059f94058b184d4a71d77d442

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant