vendor/zasync/1.1

changeset 32:906609dba97e 1.1-nux

Added property 'display_formdata' to async manager tool with default value False. This is used to prevent displaying 'formdata' contents in Plugin Arguments column of 'Calls' tab. This does matter when you pass big binary data in 'formdata' to async method and do not want that data be displayed.
author rspivak
date Wed, 24 Jan 2007 22:10:46 +0000
parents bb0262d15107
children 834d90397cb7
files manager.py
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- a/manager.py
     1.2 +++ b/manager.py
     1.3 @@ -483,6 +483,15 @@
     1.4              else:
     1.5                  original_value = d.original_failure
     1.6                  original_state = state_name_map[FAILURE]
     1.7 +
     1.8 +        # RS: Check if we should return formdata
     1.9 +        # Data stored in formdata may be expensive to fetch and display
    1.10 +        if not context.display_formdata:
    1.11 +            args = list(args)
    1.12 +            # remove 'formdata' which is at index 1
    1.13 +            del args[1]
    1.14 +            args = tuple(args)
    1.15 +
    1.16          info ={
    1.17              'key': d.key,
    1.18              'user': d.getOwnerTuple(),
    1.19 @@ -521,6 +530,8 @@
    1.20           'label': 'Resolved cache rotation period in seconds'},
    1.21          {'id':'poll_interval', 'type': 'int', 'mode': 'w',
    1.22           'label': 'Interval between zasync call polls'},
    1.23 +        {'id':'display_formdata', 'type': 'boolean', 'mode': 'w',
    1.24 +         'label': "Display formdata in Plugin Arguments of 'Calls' tab"},
    1.25          )
    1.26  
    1.27      id = 'asynchronous_call_manager'
    1.28 @@ -528,6 +539,7 @@
    1.29      icon = "misc_/zasync/tool.gif"
    1.30      rotation_period = 60*60*24 # a day
    1.31      poll_interval = 5
    1.32 +    display_formdata = False
    1.33      __plugins = ()
    1.34      _next_rotate = _last_ping = _last_pong = None
    1.35