Changeset 7084 for cows_wps


Ignore:
Timestamp:
25/06/10 09:07:48 (9 years ago)
Author:
astephen
Message:

fixes to status setting

Location:
cows_wps/trunk/process_modules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cows_wps/trunk/process_modules/extract_uk_station_data.py

    r7082 r7084  
    5959            # Now set status to started 
    6060            context.setStatus(STATUS.STARTED, 'Job is now running', 0) 
     61            # Need to save status for async processes 
     62            context.saveStatus() 
    6163 
    6264        # Resolve the list of stations 
     
    8789            # Estimate we are 5% of the way through  
    8890            context.setStatus(STATUS.STARTED, 'Extracted station ID list.', 5) 
     91            context.saveStatus() 
    8992 
    9093            # Need temp dir for big file extractions 
  • cows_wps/trunk/process_modules/lib_extract_uk_station_data/utils.py

    r7083 r7084  
    3737    output_file_paths = [] 
    3838 
    39     progress = 5 # % of way through 
     39    progress = 1 # % of way through 
    4040 
    4141    for (count, (start_date, end_date)) in enumerate(time_splits):  
     
    6262 
    6363        # Report on progress 
    64         progress += (int(count / len(time_splits) * 100) - 5) 
     64        progress += (int(float(count) / len(time_splits) * 100)) 
    6565        context.setStatus(STATUS.STARTED, 'Job is now running', progress) 
     66        context.saveStatus() 
    6667         
    6768    return output_file_paths 
Note: See TracChangeset for help on using the changeset viewer.