Skip to content

Commit 1eec6e1

Browse files
committed
Log timers of CP
1 parent 0145c50 commit 1eec6e1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

os2web_cp_service.module

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ function os2web_cp_service_alter_configuration($key, $value) {
151151
* TRUE on successful content creation.
152152
*/
153153
function os2web_cp_service_create_case(array $data) {
154+
155+
watchdog('os2web_cp_service', 'CP case start: %time', array('%time' => timer_read('cp')), WATCHDOG_NOTICE);
154156
// Prepare data.
155157
$data = array_replace_recursive(os2web_cp_service_default_case(), $data);
156158

@@ -170,6 +172,7 @@ function os2web_cp_service_create_case(array $data) {
170172
else {
171173
$node = node_load(array_pop($nids));
172174
}
175+
watchdog('os2web_cp_service', 'CP old deleted: %time', array('%time' => timer_read('cp')), WATCHDOG_NOTICE);
173176

174177
// See if the triggered rules on the published node, is approved
175178
// in the vocabulary. Otherwise the node will be unpublished.
@@ -276,6 +279,7 @@ function os2web_cp_service_create_case(array $data) {
276279
try {
277280
node_submit($node);
278281
node_save($node);
282+
watchdog('os2web_cp_service', 'CP case done: %time', array('%time' => timer_read('cp')), WATCHDOG_NOTICE);
279283
return TRUE;
280284
}
281285
catch (Exception $e) {
@@ -397,6 +401,8 @@ function os2web_cp_service_default_case() {
397401
* TRUE on successful content creation.
398402
*/
399403
function os2web_cp_service_create_document(array $data) {
404+
405+
watchdog('os2web_cp_service', 'CP document start: %time', array('%time' => timer_read('cp')), WATCHDOG_NOTICE);
400406
$data = array_replace_recursive(os2web_cp_service_default_document(), $data);
401407
// Prepare data.
402408
$query = new EntityFieldQuery();
@@ -415,6 +421,7 @@ function os2web_cp_service_create_document(array $data) {
415421
else {
416422
$node = node_load(array_pop($nids));
417423
}
424+
watchdog('os2web_cp_service', 'CP old deleted: %time', array('%time' => timer_read('cp')), WATCHDOG_NOTICE);
418425

419426
// See if the triggered rules on the published node, is approved
420427
// in the vocabulary. Otherwise the node will be unpublished.
@@ -513,6 +520,7 @@ function os2web_cp_service_create_document(array $data) {
513520
}
514521
}
515522
}
523+
watchdog('os2web_cp_service', 'CP document done: %time', array('%time' => timer_read('cp')), WATCHDOG_NOTICE);
516524
return TRUE;
517525
}
518526

0 commit comments

Comments
 (0)