Quantcast
Channel: MobileRead Forums
Viewing all articles
Browse latest Browse all 50094

Can I get notifications from a called script?

$
0
0
I can start a ThreadedJob and receive notifications using this function:

Code:

def sync_threaded(ids, db, log=None, abort=None, notifications=None):
    ...
    notifications.put((count/len(ids),
            _('Synced %d of %d')%(count, len(ids))))
    ...

In the same function, I can run another script successfully

Code:

import calibre_plugins.cal.cal2fun as cal2fun
def sync_threaded(ids, db, log=None, abort=None, notifications=None):
    ...
    cal2fun.main(ids, db)
    ...

Is it possible to call notifications.put() from within cal2fun.main() and how would I do it?

Thanks.

Viewing all articles
Browse latest Browse all 50094

Latest Images

Trending Articles



Latest Images