Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dematpayslip
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nextcloud extension
dematpayslip
Commits
dcd61991
Commit
dcd61991
authored
3 years ago
by
VESSILLER
Browse files
Options
Downloads
Patches
Plain Diff
NEW amelioration tache planifiee indexation
parent
fe6515be
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/BackgroundJob/IndexationProcess.php
+2
-7
2 additions, 7 deletions
lib/BackgroundJob/IndexationProcess.php
lib/Db/DematpayslipProcess.php
+111
-65
111 additions, 65 deletions
lib/Db/DematpayslipProcess.php
with
113 additions
and
72 deletions
lib/BackgroundJob/IndexationProcess.php
+
2
−
7
View file @
dcd61991
...
@@ -18,7 +18,6 @@ use DateTime;
...
@@ -18,7 +18,6 @@ use DateTime;
use
DateTimeZone
;
use
DateTimeZone
;
use
Exception
;
use
Exception
;
use
OCA\Dematpayslip\Db\DematpayslipArchive
;
use
OCA\Dematpayslip\Db\DematpayslipArchiveMapper
;
use
OCA\Dematpayslip\Db\DematpayslipArchiveMapper
;
use
OCA\Dematpayslip\Db\DematpayslipProcessMapper
;
use
OCA\Dematpayslip\Db\DematpayslipProcessMapper
;
use
OCA\Dematpayslip\Db\DematpayslipProcessSkipMapper
;
use
OCA\Dematpayslip\Db\DematpayslipProcessSkipMapper
;
...
@@ -222,8 +221,8 @@ class IndexationProcess extends TimedJob {
...
@@ -222,8 +221,8 @@ class IndexationProcess extends TimedJob {
$this
->
_timeZone
=
new
DateTimeZone
(
$timeZoneName
);
$this
->
_timeZone
=
new
DateTimeZone
(
$timeZoneName
);
// run once by interval
// run once by interval
$taskDefaultInterval
=
60
;
//
$taskDefaultInterval = 60;
//
$taskDefaultInterval = 3600; // 1h
$taskDefaultInterval
=
3600
;
// 1h
$taskInterval
=
intval
(
$this
->
_config
->
getAppValue
(
$this
->
_appName
,
$this
->
_appName
.
'_indexation_cron_interval'
,
$taskDefaultInterval
));
$taskInterval
=
intval
(
$this
->
_config
->
getAppValue
(
$this
->
_appName
,
$this
->
_appName
.
'_indexation_cron_interval'
,
$taskDefaultInterval
));
//print __METHOD__ . ' : time_zone_name=' . $timeZoneName . ', cron_interval=' . $taskInterval . "\n";
//print __METHOD__ . ' : time_zone_name=' . $timeZoneName . ', cron_interval=' . $taskInterval . "\n";
$this
->
setInterval
(
$taskInterval
);
$this
->
setInterval
(
$taskInterval
);
...
@@ -278,12 +277,8 @@ class IndexationProcess extends TimedJob {
...
@@ -278,12 +277,8 @@ class IndexationProcess extends TimedJob {
if
(
!
empty
(
$processList
))
{
if
(
!
empty
(
$processList
))
{
$process
=
current
(
$processList
);
$process
=
current
(
$processList
);
if
(
$process
->
getPhase
()
==
DematpayslipProcess
::
PHASE_ID_INDEXATION
)
{
if
(
$process
->
getPhase
()
==
DematpayslipProcess
::
PHASE_ID_INDEXATION
)
{
$this
->
_log
(
'Indexation process : Load'
);
$process
->
load
(
$this
->
_appName
,
$this
->
_config
,
$this
->
_dbConnection
,
$this
->
_l10n
,
$this
->
_rootFolder
,
$this
->
_shareManager
,
$this
->
_userManager
,
$userId
,
$this
->
_dematpayslipProcessMapper
,
$this
->
_dematpayslipProcessSkipMapper
,
$this
->
_dematpayslipUserMapper
,
$this
->
_timeZone
);
$process
->
load
(
$this
->
_appName
,
$this
->
_config
,
$this
->
_dbConnection
,
$this
->
_l10n
,
$this
->
_rootFolder
,
$this
->
_shareManager
,
$this
->
_userManager
,
$userId
,
$this
->
_dematpayslipProcessMapper
,
$this
->
_dematpayslipProcessSkipMapper
,
$this
->
_dematpayslipUserMapper
,
$this
->
_timeZone
);
$this
->
_log
(
'Indexation process : Indexation Begin'
);
$result
=
$process
->
indexation
(
$processMsgList
);
$result
=
$process
->
indexation
(
$processMsgList
);
$this
->
_log
(
'Indexation process : Indexation End'
);
if
(
$result
<
0
)
{
if
(
$result
<
0
)
{
$this
->
_log
(
'Indexation process : Error : '
,
self
::
LOG_ERROR
);
$this
->
_log
(
'Indexation process : Error : '
,
self
::
LOG_ERROR
);
...
...
This diff is collapsed.
Click to expand it.
lib/Db/DematpayslipProcess.php
+
111
−
65
View file @
dcd61991
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