Hi, I'm having trouble with receiving subscribed events from CUPS. It might be a programming question, but I think it's rather an issue of configuration.

I'm using the pycups python library to communicate with CUPS. So far I have done following:

1) Subscribed for all CUPS events (I have a simple http server listening on http://localhost:9988 for incoming events and CUPS is using cups-http-notifier to send those events):
Code:
connection = cups.Connection()
connection.createSubscription(
    uri="http://localhost:631/printers",
    recipient_uri="http://localhost:9988",
    events=['all'],
    lease_duration=0
)

2) Printed file:
Code:
connection = cups.Connection()
connection.printFile(printer, file_path, job_id, options)
With this setup I'm receiving all kinds of events regarding printers and the job being printed - this works well, as expected.


The issue arises when canceling the job programatically:
Code:
connection = cups.Connection()
connection.cancelJob(job_id,False)

The job gets cancelled (checked in CUPS web interface), but I don't receive the event. When I cancel the job via the web interface, the event is received as any other. The other strange thing is that I get system notification about the job being cancelled - so at least dbus notification is sent...

I'm thinking that there could be an issue with users - subscription owner vs job owner vs cancellation owner, but I'm doing all those things from one python script (under one user) and I have really no idea what to configure.

Any ideas what could be wrong? Thanks in advance!