Ticket #49 (closed enhancement: fixed)

Opened 15 years ago

Last modified 14 years ago

Feature Request: Ability to have a hook stop all hook and job processing, but not cancel the job.

Reported by: bpkroth Owned by: jerome
Priority: major Milestone: 1.27 final
Component: tea4cups Version: development
Keywords: Cc:

Description

Original email:

New question: when using serialized hooks, can one hook be setup to stop
all the rest of them without canceling the job? For example, by exiting
with a value of -2 instead of -1?

For example:

prehook_30checkprinter : check-printer.pl
prehook_40accounting : accounting.pl

In this case check-printer.pl does an nmap on the DEVICE_URI to make
sure it's available, if not it stops the queue and exits with a value of
1.

However, then 40accounting still gets run.

I had originally kept this all in one check but the helpdesk people
wanted to see the state as reported in cups reflect these two cases.
For example:

"Tea4CUPS v3.12-3512 (PID 32004) : Prehook prehook_30checkprinter on
printer testing2 didn't exit successfully."

Instead of:
"Tea4CUPS v3.12-3512 (PID 32004) : Prehook prehook_40accounting on
printer testing2 didn't exit successfully."


This is not possible right now, but could be added in a future release.


Please file a feature request at http://trac.pykota.com


bye


Jerome Alet

Attachments

tea4cups-possible-patch.txt (1.7 kB) - added by bpkroth 15 years ago.
A quick patch that may provide the functionality I described, implemented using another "special" return code.

Change History

Changed 15 years ago by bpkroth

A quick patch that may provide the functionality I described, implemented using another "special" return code.

Changed 14 years ago by jerome

  • status changed from new to accepted

Changed 14 years ago by jerome

  • status changed from accepted to closed
  • resolution set to fixed

(In [3523]) Should fix #49. This is entirely untested, so please report any problem ASAP.

Note: See TracTickets for help on using tickets.