Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
feeds
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
feeds
Commits
5ec66a52
Commit
5ec66a52
authored
15 years ago
by
Alex Barth
Browse files
Options
Downloads
Patches
Plain Diff
Take actual start time for calculating elapsed time.
Don't log to watchdog when starting cron run.
parent
78df7b6d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
includes/FeedsScheduler.inc
+3
-8
3 additions, 8 deletions
includes/FeedsScheduler.inc
with
3 additions
and
8 deletions
includes/FeedsScheduler.inc
+
3
−
8
View file @
5ec66a52
...
@@ -96,17 +96,12 @@ class FeedsScheduler implements IFeedsScheduler {
...
@@ -96,17 +96,12 @@ class FeedsScheduler implements IFeedsScheduler {
*/
*/
public
function
cron
()
{
public
function
cron
()
{
// Logging and timeout tracking.
// Check and set scheduler semaphore, take time.
if
(
$this
->
time
()
==
FEEDS_REQUEST_TIME
)
{
watchdog
(
'FeedsScheduler'
,
'Start processing'
);
}
else
{
watchdog
(
'FeedsScheduler'
,
'Start - !date (debug time !time)'
,
array
(
'!date'
=>
format_date
(
$this
->
time
()),
'!time'
=>
$this
->
time
()));
}
if
(
variable_get
(
'feeds_scheduler_cron'
,
FALSE
))
{
if
(
variable_get
(
'feeds_scheduler_cron'
,
FALSE
))
{
watchdog
(
'FeedsScheduler'
,
'Last cron process did not finish.'
,
array
(),
WATCHDOG_ERROR
);
watchdog
(
'FeedsScheduler'
,
'Last cron process did not finish.'
,
array
(),
WATCHDOG_ERROR
);
}
}
variable_set
(
'feeds_scheduler_cron'
,
TRUE
);
variable_set
(
'feeds_scheduler_cron'
,
TRUE
);
$start
=
time
();
// Get feeds configuration, check whether drupal_queue is present and set
// Get feeds configuration, check whether drupal_queue is present and set
// parameters accordingly.
// parameters accordingly.
...
@@ -157,7 +152,7 @@ class FeedsScheduler implements IFeedsScheduler {
...
@@ -157,7 +152,7 @@ class FeedsScheduler implements IFeedsScheduler {
// Unflag and post a message that we're done.
// Unflag and post a message that we're done.
variable_set
(
'feeds_scheduler_cron'
,
FALSE
);
variable_set
(
'feeds_scheduler_cron'
,
FALSE
);
watchdog
(
'FeedsScheduler'
,
'Finished processing schedule after !time.'
,
array
(
'!time'
=>
format_interval
(
time
()
-
$
this
->
time
()
)));
watchdog
(
'FeedsScheduler'
,
'Finished processing schedule after !time.'
,
array
(
'!time'
=>
format_interval
(
time
()
-
$
start
)));
}
}
/**
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment