Allow jobqueue.pl to specify where it stores its PID

RESOLVED FIXED in Bugzilla 3.4

Status

()

Bugzilla
Email Notifications
--
enhancement
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: Max Kanat-Alexander, Assigned: Max Kanat-Alexander)

Tracking

3.4.1
Bugzilla 3.4
Bug Flags:
approval +
approval3.4 +

Details

(Whiteboard: [es-gnome])

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

8 years ago
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.
(Assignee)

Comment 1

8 years ago
Created attachment 393602 [details] [diff] [review]
v1
Assignee: email-notifications → mkanat
Status: NEW → ASSIGNED
Attachment #393602 - Flags: review?(justdave)
(Assignee)

Updated

8 years ago
Whiteboard: [es-gnome]
(Assignee)

Updated

8 years ago
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-
(Assignee)

Comment 4

8 years ago
Created attachment 394906 [details] [diff] [review]
v2
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+
(Assignee)

Comment 6

8 years ago
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
Last Resolved: 8 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.