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
b7c0e722
Commit
b7c0e722
authored
14 years ago
by
Alex Barth
Browse files
Options
Downloads
Patches
Plain Diff
Log time consumed by import.
parent
c55df077
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/FeedsSource.inc
+8
-1
8 additions, 1 deletion
includes/FeedsSource.inc
with
8 additions
and
1 deletion
includes/FeedsSource.inc
+
8
−
1
View file @
b7c0e722
...
@@ -14,6 +14,7 @@ class FeedsLockException extends Exception {}
...
@@ -14,6 +14,7 @@ class FeedsLockException extends Exception {}
/**
/**
* Denote a import or clearing stage. Used for multi page processing.
* Denote a import or clearing stage. Used for multi page processing.
*/
*/
define
(
'FEEDS_START'
,
'start_time'
);
define
(
'FEEDS_FETCH'
,
'fetch'
);
define
(
'FEEDS_FETCH'
,
'fetch'
);
define
(
'FEEDS_PARSE'
,
'parse'
);
define
(
'FEEDS_PARSE'
,
'parse'
);
define
(
'FEEDS_PROCESS'
,
'process'
);
define
(
'FEEDS_PROCESS'
,
'process'
);
...
@@ -329,6 +330,11 @@ class FeedsSource extends FeedsConfigurable {
...
@@ -329,6 +330,11 @@ class FeedsSource extends FeedsConfigurable {
public
function
import
()
{
public
function
import
()
{
$this
->
acquireLock
();
$this
->
acquireLock
();
try
{
try
{
// If fetcher result is empty, we are starting a new import, log.
if
(
empty
(
$this
->
fetcher_result
))
{
$this
->
state
[
FEEDS_START
]
=
time
();
}
// Fetch.
// Fetch.
if
(
empty
(
$this
->
fetcher_result
)
||
FEEDS_BATCH_COMPLETE
==
$this
->
progressParsing
())
{
if
(
empty
(
$this
->
fetcher_result
)
||
FEEDS_BATCH_COMPLETE
==
$this
->
progressParsing
())
{
$this
->
fetcher_result
=
$this
->
importer
->
fetcher
->
fetch
(
$this
);
$this
->
fetcher_result
=
$this
->
importer
->
fetcher
->
fetch
(
$this
);
...
@@ -350,7 +356,8 @@ class FeedsSource extends FeedsConfigurable {
...
@@ -350,7 +356,8 @@ class FeedsSource extends FeedsConfigurable {
$result
=
$this
->
progressImporting
();
$result
=
$this
->
progressImporting
();
if
(
$result
==
FEEDS_BATCH_COMPLETE
||
isset
(
$e
))
{
if
(
$result
==
FEEDS_BATCH_COMPLETE
||
isset
(
$e
))
{
module_invoke_all
(
'feeds_after_import'
,
$this
);
module_invoke_all
(
'feeds_after_import'
,
$this
);
$this
->
imported
=
REQUEST_TIME
;
$this
->
imported
=
time
();
$this
->
log
(
'import'
,
'Imported in !s s'
,
array
(
'!s'
=>
$this
->
imported
-
$this
->
state
[
FEEDS_START
]),
WATCHDOG_INFO
);
unset
(
$this
->
fetcher_result
,
$this
->
state
);
unset
(
$this
->
fetcher_result
,
$this
->
state
);
}
}
$this
->
save
();
$this
->
save
();
...
...
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