projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixes group aliases display.
[platal.git]
/
bin
/
cron
/
cron_ml_moderate.php
diff --git
a/bin/cron/cron_ml_moderate.php
b/bin/cron/cron_ml_moderate.php
index
c6d22a6
..
e77643d
100755
(executable)
--- a/
bin/cron/cron_ml_moderate.php
+++ b/
bin/cron/cron_ml_moderate.php
@@
-1,7
+1,7
@@
#!/usr/bin/php5 -q
<?php
/***************************************************************************
#!/usr/bin/php5 -q
<?php
/***************************************************************************
- * Copyright (C) 2003-201
0
Polytechnique.org *
+ * Copyright (C) 2003-201
1
Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-26,6
+26,11
@@
ini_set('memory_limit', '128M');
$sent_mails = 0;
$handler = time();
$sent_mails = 0;
$handler = time();
+/* Cleanup dead locks */
+XDB::execute('UPDATE email_list_moderate
+ SET handler = NULL
+ WHERE handler < NOW() - 300');
+
while ($sent_mails < $globals->lists->max_mail_per_min
&& time() - $handler < 60) {
// take a lock on a mail
while ($sent_mails < $globals->lists->max_mail_per_min
&& time() - $handler < 60) {
// take a lock on a mail