Closed Bug 509539 Opened 15 years ago Closed 15 years ago

Allow jobqueue.pl to specify where it stores its PID

Categories

(Bugzilla :: Email Notifications, enhancement)

3.4.1
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.4

People

(Reporter: mkanat, Assigned: mkanat)

References

Details

(Whiteboard: [es-gnome])

Attachments

(1 file, 1 obsolete file)

Right now, you can't change where jobqueue.pl stores its PID without editing the code. As justdave pointed out, this makes it hard for multi-server situations where data/ is NFS-mounted (Mozilla).

The attached patch allows you to specify the PID, the name of the process for the log file (which will help our sysv init script), and also fixes a bug that "progname" was actually being ignored and was always $0.
Attached patch v1 (obsolete) — Splinter Review
Assignee: email-notifications → mkanat
Status: NEW → ASSIGNED
Attachment #393602 - Flags: review?(justdave)
Whiteboard: [es-gnome]
Attachment #393602 - Flags: review?(justdave) → review?(dkl)
(In reply to comment #1)
> Created an attachment (id=393602) [details]
> v1

I have just returned from a week off so I should be able to look at this on
Monday EDT.

Dave
Comment on attachment 393602 [details] [diff] [review]
v1

>===================================================================
>+   -p dir    Specify the file where jobqueue.pl should store its current
>+             process id. Defaults to F<data/jobqueue.pl.pid>.

This should be 

     -p pidfile ...

as "dir" is incorrect. For example if you want the pid file in data/jobqueue/
and say " -p data/jobqueue" it gives error that that is a directory and not
a file.

Otherwise everything worked as expected and I don't have any other issues with the code.

Dave
Attachment #393602 - Flags: review?(dkl) → review-
Attached patch v2Splinter Review
Attachment #393602 - Attachment is obsolete: true
Attachment #394906 - Flags: review?(dkl)
Comment on attachment 394906 [details] [diff] [review]
v2

Looks good. r=dkl
Attachment #394906 - Flags: review?(dkl) → review+
tip:

Checking in jobqueue.pl;
/cvsroot/mozilla/webtools/bugzilla/jobqueue.pl,v  <--  jobqueue.pl
new revision: 1.3; previous revision: 1.2
done
Checking in Bugzilla/JobQueue/Runner.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/JobQueue/Runner.pm,v  <--  Runner.pm
new revision: 1.4; previous revision: 1.3
done


3.4:

Checking in jobqueue.pl;
/cvsroot/mozilla/webtools/bugzilla/jobqueue.pl,v  <--  jobqueue.pl
new revision: 1.2.2.1; previous revision: 1.2
done
Checking in Bugzilla/JobQueue/Runner.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/JobQueue/Runner.pm,v  <--  Runner.pm
new revision: 1.2.2.2; previous revision: 1.2.2.1
done
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: approval3.4+
Flags: approval+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: