Changeset 887 for pykota/trunk/bin

Show
Ignore:
Timestamp:
04/08/03 22:38:08 (21 years ago)
Author:
jalet
Message:

The last job Id is saved now for each printer, this will probably
allow other accounting methods in the future.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/pykota

    r873 r887  
    2323# 
    2424# $Log$ 
     25# Revision 1.16  2003/04/08 20:38:08  jalet 
     26# The last job Id is saved now for each printer, this will probably 
     27# allow other accounting methods in the future. 
     28# 
    2529# Revision 1.15  2003/03/29 13:45:27  jalet 
    2630# GPL paragraphs were incorrectly (from memory) copied into the sources. 
     
    131135         
    132136    #     
     137    # According to CUPS documentation, the job id is the second command line argument 
     138    jobid = sys.argv[1].strip() 
     139     
     140    #     
    133141    # According to CUPS documentation, the username is the third command line argument 
    134142    username = sys.argv[2].strip()     
     
    155163    else :     
    156164        # get last values from Quota Storage 
    157         (lastpagecounter, lastusername) = (pgc["pagecounter"], pgc["lastusername"]) 
     165        (lastpagecounter, lastjobid, lastusername) = (pgc["pagecounter"], pgc["lastjobid"], pgc["lastusername"]) 
    158166         
    159167        # if printer is off then we assume the correct counter value is the last one 
     
    163171        # Update the last page counter and last username in the Quota Storage backend 
    164172        # set them to current user and  
    165         kotafilter.storage.updatePrinterPageCounter(kotafilter.printername, username, counterbeforejob) 
     173        kotafilter.storage.updatePrinterPageCounter(kotafilter.printername, username, counterbeforejob, jobid) 
    166174         
    167175        # Was the printer ever used ?