No description
- Perl 99.7%
- Shell 0.3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Notifications used to shell out to imessage once per ripped track (ripper.pl) and once per encoded file (encoder.pl), with no timeout. That meant a burst of texts when several discs/encodes were running in parallel, and a hung imessage call could stall a run indefinitely. Add NotifyThrottle.pm, shared by both scripts: - Messages are appended to a queue file (/tmp/ripper-notify.queue) under an flock shared by all instances (/tmp/ripper-notify.lock). - At most one iMessage is sent per 5 minutes (stamp in /tmp/ripper-notify.last). Whoever finds the window open sends everything queued as a single message, one [HH:MM]-prefixed line per entry, so ripper and encoder messages from any number of parallel runs get consolidated. - When throttled, a detached background waiter is forked so the caller doesn't block; it sleeps until the window opens and sends whatever is still queued, or exits if another instance already sent it. - imessage is run via IPC::Run with a 120s timeout; a hung call is killed and treated as a failure. Failed messages are put back at the front of the queue and retried next window, up to 3 attempts per sender. - imessage is invoked with a list (no shell), so titles/filenames with quotes or shell metacharacters no longer break the command. - The queue lock is dropped while imessage runs, so other instances are never blocked behind a slow send. ripper.pl: instead of one message per track, collect a summary of each ripped track and send a single "Disc done" notification after the disc is fully ripped, ejected and its device lock released. Per-track lines are still written to the log as each track finishes. encoder.pl: per-file "Encoding finished" notifications now go through the shared throttled queue. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
| .gitignore | ||
| arm_encoder.pl | ||
| encoder.pl | ||
| iTunMOVI-1.1.pl | ||
| loop_wait_rip_encode.sh | ||
| NotifyThrottle.pm | ||
| omdb_query.pl | ||
| OmdbClient.pm | ||
| ripper.pl | ||