Committer: sbelyaev
LJSUP-13491: Doesn't work scheduled_postU trunk/cgi-bin/LJ/DelayedEntry/Scheduler.pm U trunk/cgi-bin/LJ/DelayedEntry.pm
Modified: trunk/cgi-bin/LJ/DelayedEntry/Scheduler.pm =================================================================== --- trunk/cgi-bin/LJ/DelayedEntry/Scheduler.pm 2012-08-31 14:28:20 UTC (rev 22789) +++ trunk/cgi-bin/LJ/DelayedEntry/Scheduler.pm 2012-08-31 14:30:57 UTC (rev 22790) @@ -151,6 +151,8 @@ __notify_user( $entry->poster, $entry->journal); + + $entry->mark_posted(); next; } Modified: trunk/cgi-bin/LJ/DelayedEntry.pm =================================================================== --- trunk/cgi-bin/LJ/DelayedEntry.pm 2012-08-31 14:28:20 UTC (rev 22789) +++ trunk/cgi-bin/LJ/DelayedEntry.pm 2012-08-31 14:30:57 UTC (rev 22790) @@ -228,6 +228,19 @@ 'res' => $res }; } +sub mark_posted { + my ($self) = @_; + + $self->journal->do( "UPDATE delayedlog2 SET ". + "finaltime=NOW(), url=? " . + "WHERE delayedid = ? AND " . + "journalid = ?", + undef, + "not posted", + $self->delayedid, + $self->journalid ); +} + sub convert_from_data { my ($self, $req) = @_; my $flags = { 'noauth' => 1,