-
Notifications
You must be signed in to change notification settings - Fork 458
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
Provide setting for number of saved jobs for PreserveJobFiles #3143
Comments
CUPS.org User: mike This makes sense; will add it. |
CUPS.org User: mike Moving this to 1.6 milestone; rather than just having a control for preserving the last N jobs I think we will implement a timeout for job preservation, e.g.:
will preserve job files indefinitely, while:
will preserve job files for 1 hour (3600 seconds) after completion and:
will disable preservation as before. In addition, we'll extend PreserveJobs in the same way so that a site can configure "MaxJobs 0" but only retain job history for the last week (for example). Maybe I'll add some unit support for all of the time values while I am at it (e.g. "1d" for 1 day, etc.) |
CUPS.org User: mike Fixed in Subversion repository. |
"str3143.patch": Index: doc/index.html.in--- doc/index.html.in (revision 10356) Index: doc/help/ref-cupsd-conf.html.in--- doc/help/ref-cupsd-conf.html.in (revision 10356) You can also edit this file from the CUPS web interface, which automatically handles restarting the scheduler. + Note: + + AccessLogExamples@@ -632,19 +638,21 @@Examples+DirtyCleanInterval 1w +DirtyCleanInterval 1d +DirtyCleanInterval 1h +DirtyCleanInterval 1m DirtyCleanInterval 30 DirtyCleanInterval 0 Description- The + The + The default value is DocumentRootExamples@@ -1022,35 +1030,39 @@Examples+JobRetryInterval 1w +JobRetryInterval 1d +JobRetryInterval 1h +JobRetryInterval 1m JobRetryInterval 30 -JobRetryInterval 120 Description- The + The + The default is CUPS 1.4/Mac OS X 10.6JobKillDelayExamples+JobKillDelay 1w +JobKillDelay 1d +JobKillDelay 1h +JobKillDelay 1m JobKillDelay 30 -JobKillDelay 120 Description- The + The + The default is CUPS 1.2/Mac OS X 10.5JobRetryLimitExamples@@ -1095,17 +1107,20 @@Examples-KeepAliveTimeout 60 +KeepAliveTimeout 1w +KeepAliveTimeout 1d +KeepAliveTimeout 1h +KeepAliveTimeout 1m KeepAliveTimeout 30 Description- The + The + The default is CUPS 1.1.7Limit (Location)Examples@@ -1681,14 +1696,16 @@MaxHoldTime 10800 +MaxHoldTime 3h +MaxHoldTime 180m MaxHoldTime 0 Description- The + The - The default setting is 0 which disables this functionality. + The default setting is MaxJobs@@ -1763,6 +1780,8 @@MaxJobTime 10800 +MaxJobTime 3h +MaxJobTime 180m MaxJobTime 0 @@ -1770,10 +1789,9 @@ The - Setting the maximum time to 0 disables this functionality. The default + Setting the maximum time to MaxLogSize@@ -1825,17 +1843,20 @@Examples-MultipleOperationTimeout 60 +MultipleOperationTimeout 1w +MultipleOperationTimeout 1d +MultipleOperationTimeout 1h +MultipleOperationTimeout 5m MultipleOperationTimeout 300 -MultipleOperationTimeout 86400 Description- The + The + The default is OrderExamples@@ -2026,22 +2047,26 @@PreserveJobHistory On PreserveJobHistory Off +PreserveJobHistory 1w +PreserveJobHistory 7d +PreserveJobHistory 168h +PreserveJobHistory 10080m +PreserveJobHistory 604800 Description- The + The - A value of + The default value is - A value of + Note: + + PreserveJobFilesExamples@@ -2049,23 +2074,28 @@PreserveJobFiles On PreserveJobFiles Off +PreserveJobFiles 1w +PreserveJobFiles 7d +PreserveJobFiles 168h +PreserveJobFiles 10080m +PreserveJobFiles 604800 Description- The + The - A value of + A value of - A value of + The default value is + Note: + + PrintcapExamples@@ -2239,19 +2269,20 @@RootCertDuration 0 +RootCertDuration 1w +RootCertDuration 1d +RootCertDuration 1h +RootCertDuration 5m RootCertDuration 300 Description- The + The + The default is CUPS 1.1.7SatisfyExamples@@ -2649,17 +2680,21 @@Examples+Timeout 1w +Timeout 1d +Timeout 1h +Timeout 5m Timeout 300 -Timeout 90 DescriptionThe + The default timeout is CUPS 1.2/Mac OS X 10.5UseNetworkDefaultExamplesIndex: templates/admin.tmpl--- templates/admin.tmpl (revision 10356) Index: templates/trailer.tmpl--- templates/trailer.tmpl (revision 10356) Index: cgi-bin/admin.c--- cgi-bin/admin.c (revision 10356)
- max_jobs = "500";
@@ -1674,7 +1693,7 @@
if ((val = cupsGetOption("PreserveJobFiles", num_settings,
} if ((val = cupsGetOption("MaxClients", num_settings, settings)) == NULL) Index: scheduler/conf.c--- scheduler/conf.c (revision 10356)
/*
@@ -3140,12 +3147,15 @@
@@ -3158,6 +3168,13 @@
for (job = (cupsd_job_t *)cupsArrayFirst(Jobs);
@@ -1327,26 +1373,14 @@
if (job->printer) if (action == CUPSD_JOB_PURGE)
- }cupsdClearString(&job->username);
- unlink(filename);
if (job->history) snprintf(jobfile, sizeof(jobfile), "%s/c%05d", RequestRoot, job->id);
- }
- }if (ippReadIO(fp, (ipp_iocb_t)cupsFileRead, 1, NULL, job->attrs) != IPP_DATA)
if (!job->dest)
- }- job->num_files = 0;
- unlink(jobfile);return (0); @@ -2140,8 +2160,7 @@
@@ -2149,17 +2168,10 @@ snprintf(filename, sizeof(filename), "%s/c%05d", RequestRoot, job->id);
job->attrs->state = IPP_IDLE;
@@ -2616,28 +2615,8 @@
- free(job->compressions);
- }
@@ -2728,6 +2707,62 @@ /*
@@ -4221,6 +4256,67 @@ /*
+/*
+/*
@@ -4229,13 +4325,40 @@
if ((attr = ippFindAttribute(job->attrs, name, IPP_TAG_ZERO)) != NULL)
@@ -4289,6 +4412,8 @@ job->cost = 0;
-VAR int JobHistory VALUE(1);
-#define DEFAULT_HISTORY 1 /* Preserve job history? / /* Index: scheduler/main.c--- scheduler/main.c (revision 10356)
@@ -1773,6 +1779,9 @@
for (job = (cupsd_job_t *)cupsArrayFirst(ActiveJobs);
if (job->kill_time && job->kill_time < timeout)
|
Version: 1.6-feature
CUPS.org User: martin.pitt.canonical
Hello,
https://launchpad.net/bugs/343801 asks for enabling PreserveJobFiles by default, to make it easier to reattempt a print job after some trouble.
However, I don't see how to configure this by default in a sensible manner. The number of job files which get permanently stored is controlled by "MaxJobs". But this also configures how many jobs can be in the print queue.
Thus we want to leave this at the default 500 to avoid queue rejections in larger office environments. But at the same time we don't want to permanently store the 500 last jobs on disk, since that'd take a huge amount of disk space, which isn't an option on smaller computers.
Would it be possible to have a separate configuration setting "MaxPreserveJobs" to set a different limit for "PreserveJobFiles"? I think something like "2" would be a good default, since it is common to reattempt the previous job, but few people will bother with reattempting the print job of two months ago.
Thank you for considering!
The text was updated successfully, but these errors were encountered: