largersmallernormaltext version of this page

View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014762phplistRepetitionpublic30-05-08 11:3830-05-08 15:10
Reporterflohack 
PrioritynormalSeveritytweakReproducibilitysometimes
StatusnewResolutionopen 
PlatformOSOS Version
Product Version2.10.5 
Target Version2.11.XFixed in Version 
Summary0014762: RSS-Messages get wrong embargo time
Descriptionafter a few months of running without this problem, messages are suddenly rewritten with the wrong embargo time (end of job + frequency instead of beginning of job + frequency).
the other day the cron job finds a message still on hold, as the embargo is not reached and skips the submission.
Additional InformationOur investiagtion in the PHP code discovered the cause of the problem (or the sympton?): The embargo is set to either old_embargo + frequency or now() + frequency on the end of the queue run. based on a flag isfuture, the decision is wrongly made for the second option, as the condition "date_add(embargo,interval repeatinterval minute) > now() as isfuture" is always true. newembargo is calculated: "date_add(embargo,interval repeatinterval minute)", and newembargo2 as "date_add(now(),interval repeatinterval minute)"
then there are some lines not connected with this code, finally:

# correct some values
        if (!$msgdata["isfuture"]) {
                $msgdata["newembargo"] = $msgdata["newembargo2"];

this is bad coding style, not connected with the first few lines which actually calculate these values, and the whole construct is simply not correct. The clause should be IMHO "date_add(embargo,interval repeatinterval minute) < now()", then an incorrect embargo would be detected, and the normal case would be handled as it should be.

thanks for reading up to here.
TagsNo tags attached.
Attached Files

- Relationships
related to 0014115new rsslib.php: user send check compares interval too strict 

-  Notes
There are no notes attached to this issue.


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker