- 
                Notifications
    
You must be signed in to change notification settings  - Fork 32
 
WIP: 🐛 Clean removal of output files #6986
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
          
     Closed
      
      
            giancarloromeo
  wants to merge
  20
  commits into
  ITISFoundation:master
from
giancarloromeo:is6963/clean-output-files-removal
  
      
      
   
      
    
  
     Closed
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            20 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      a828994
              
                update comment
              
              
                giancarloromeo abc4ce0
              
                Merge remote-tracking branch 'upstream/master' into is6963/clean-outp…
              
              
                giancarloromeo 7b914eb
              
                Merge branch 'master' into is6963/clean-output-files-removal
              
              
                giancarloromeo abe60b8
              
                Merge remote-tracking branch 'upstream/master' into is6963/clean-outp…
              
              
                giancarloromeo 37acb71
              
                Merge branch 'is6963/clean-output-files-removal' of github.com:gianca…
              
              
                giancarloromeo 639a561
              
                add ref_count column
              
              
                giancarloromeo 84782af
              
                add ref_count field
              
              
                giancarloromeo 55d17a8
              
                Merge branch 'master' into is6963/clean-output-files-removal
              
              
                giancarloromeo 08f436c
              
                Merge remote-tracking branch 'upstream/master' into is6963/clean-outp…
              
              
                giancarloromeo 34d38c8
              
                Merge branch 'master' into is6963/clean-output-files-removal
              
              
                giancarloromeo 42e1d33
              
                Merge branch 'is6963/clean-output-files-removal' of github.com:gianca…
              
              
                giancarloromeo d206013
              
                upgrade script
              
              
                giancarloromeo ee0f739
              
                Merge remote-tracking branch 'upstream/master' into is6963/clean-outp…
              
              
                giancarloromeo efb57ab
              
                add rabbitmq client setup
              
              
                giancarloromeo 2bf9eb6
              
                add event when deleting file
              
              
                giancarloromeo a229d0a
              
                Merge remote-tracking branch 'upstream/master' into is6963/clean-outp…
              
              
                giancarloromeo 31e1327
              
                remove ref_count
              
              
                giancarloromeo 1356f11
              
                remove ref_count
              
              
                giancarloromeo ec4379a
              
                rename
              
              
                giancarloromeo 04ceb61
              
                add nodes outputs update
              
              
                giancarloromeo File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| from typing import cast | ||
| 
     | 
||
| from aiohttp import web | ||
| from servicelib.rabbitmq._client import RabbitMQClient | ||
| from servicelib.rabbitmq._utils import wait_till_rabbitmq_responsive | ||
| 
     | 
||
| from .constants import APP_CONFIG_KEY | ||
| from .settings import Settings | ||
| 
     | 
||
| _APP_RABBITMQ_CLIENT_KEY = "APP_RABBITMQ_CLIENT_KEY" | ||
| 
     | 
||
| 
     | 
||
| async def _rabbitmq_client(app: web.Application): | ||
| app[_APP_RABBITMQ_CLIENT_KEY] = None | ||
| settings: Settings = app[APP_CONFIG_KEY] | ||
| assert settings.STORAGE_RABBITMQ # nosec | ||
| rabbitmq_settings = settings.STORAGE_RABBITMQ | ||
| 
     | 
||
| await wait_till_rabbitmq_responsive(f"{rabbitmq_settings.dsn}") | ||
| 
     | 
||
| app[_APP_RABBITMQ_CLIENT_KEY] = RabbitMQClient("storage", rabbitmq_settings) | ||
| 
     | 
||
| yield | ||
| 
     | 
||
| await app[_APP_RABBITMQ_CLIENT_KEY].close() | ||
| 
     | 
||
| 
     | 
||
| def setup_rabbitmq(app: web.Application): | ||
| if _rabbitmq_client not in app.cleanup_ctx: | ||
| app.cleanup_ctx.append(_rabbitmq_client) | ||
| 
     | 
||
| 
     | 
||
| def get_rabbitmq_client(app: web.Application) -> RabbitMQClient: | ||
| return cast(RabbitMQClient, app[_APP_RABBITMQ_CLIENT_KEY]) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.