You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Periodic sync. may stop when fatal error occurs in sync function. #2
Activity
masiuchi commentedon Mar 27, 2015
Rough patch. This is not checked.
diff --git a/plugins/PeriodicSync/lib/PeriodicSync.pm b/plugins/PeriodicSync/lib/PeriodicSync.
index 2a1891d..ef1d1e8 100644
--- a/plugins/PeriodicSync/lib/PeriodicSync.pm
+++ b/plugins/PeriodicSync/lib/PeriodicSync.pm
@@ -22,7 +22,9 @@ sub override {
sub work {
my ( $class, $job ) = @;
Do nothing when an error occurs.
if (MT::TheSchwartz::Job->exist(
@@ -30,7 +32,8 @@ sub _work {
)
)
{
}
my $plugin = MT->component('PeriodicSync');$sync_period =~ m/^\d+$ / )
@@ -45,7 +48,8 @@ sub _work {
&& $sync_period
&&
{
}
my $epoch = ts2epoch( undef, $sync_setting->schedule_date );
@@ -60,7 +64,8 @@ sub _work {
$job->run_after($epoch);
$job->save or die $job->errstr;
return;
if ($error) { die $error }
else {return}
}
1;