Bogus accounts in patchwork
Carl Worth
cworth at cworth.org
Thu Apr 24 04:06:21 EST 2014
Carl Worth <cworth at cworth.org> writes:
> I don't think our installation uses cron for anything related to
> patchwork. I grepped for "cron" in the patchwork source repository and
> didn't find any documentation on setting this up. Can you point me to
> what's necessary to fire off the autoexpiry if I have your patch
> applied?
[Sorry for speaking to quickly and now facing the embarrassment of
replying to myself.]
My grep only looked for "cron" within files, so I missed the
patchwork-cron.py filename, (which was evident enough when I looked
closer at the patch).
It didn't work for me to simply run this file, but by looking at the
parsemail.sh script[*] which I was already invoking from /etc/aliases, I
was able to adapt something that let me run patchwork-cron.py.
It does seem that it would be convenient if the environment-setup pieces
there were abstracted someway to make it more convenient to run
patchwork utility programs.
But with that, I was able to reduce the number of patchwork user
profiles on freedesktop.org from 1309 to 126. Thanks!
I would have followed up with a patch to the documentation on how to
setup the cron job, but there are still two things I'm unclear on:
1. How should the environment-setup be done. Do we need another shell
wrapper (patchwork-cron.sh) looking almost the same as parsemail.sh?
It seems silly and fragile to duplicate this stuff.
What's a cleaner solution?
2. What is the send_notifications() stuff in the default cron job all
about?
I commented it out before I ran this (since I just wanted
autoexpiry). We've never run this cron job before, so I didn't know
what messages would be sent to whom, and didn't want to spam anybody.
So I also don't know how to document why someone would want to enable
these cron-based notifications nor how they might configure or
control them.
Thanks,
-Carl
[*] Here's what I found in parsemail.sh:
BIN_DIR=`dirname $0`
PATCHWORK_BASE=`readlink -e $BIN_DIR/../../..`
PYTHONPATH="$PATCHWORK_BASE/apps":"$PATCHWORK_BASE/lib/python" \
DJANGO_SETTINGS_MODULE=settings \
"$PATCHWORK_BASE/apps/patchwork/bin/parsemail.py"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/patchwork/attachments/20140423/cf23bd79/attachment.sig>
More information about the Patchwork
mailing list