Skip to content
GitLab
Explorer
Connexion
S'inscrire
Navigation principale
Rechercher ou aller à…
Projet
S
stats-facil
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Registre de conteneur
Registre de modèles
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
facil
stats-facil
Validations
6ab57de0
Valider
6ab57de0
rédigé
9 years ago
par
Thomas Steur
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Fix custom date ranges are still being archived when --force-periods=day
parent
96ae06bd
Aucune branche associée trouvée
Branches contenant la validation
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
2
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
2 fichiers modifiés
core/CronArchive.php
+10
-7
10 ajouts, 7 suppressions
core/CronArchive.php
plugins/CoreConsole/Commands/CoreArchiver.php
+1
-1
1 ajout, 1 suppression
plugins/CoreConsole/Commands/CoreArchiver.php
avec
11 ajouts
et
8 suppressions
core/CronArchive.php
+
10
−
7
Voir le fichier @
6ab57de0
...
@@ -612,13 +612,16 @@ class CronArchive
...
@@ -612,13 +612,16 @@ class CronArchive
$success
=
$periodArchiveWasSuccessful
&&
$success
;
$success
=
$periodArchiveWasSuccessful
&&
$success
;
}
}
// period=range
if
(
$this
->
shouldProcessPeriod
(
'range'
))
{
$customDateRangesToPreProcessForSite
=
$this
->
getCustomDateRangeToPreProcess
(
$idSite
);
// period=range
foreach
(
$customDateRangesToPreProcessForSite
as
$dateRange
)
{
$customDateRangesToPreProcessForSite
=
$this
->
getCustomDateRangeToPreProcess
(
$idSite
);
$archiveSegments
=
false
;
// do not pre-process segments for period=range #7611
foreach
(
$customDateRangesToPreProcessForSite
as
$dateRange
)
{
$periodArchiveWasSuccessful
=
$this
->
archiveReportsFor
(
$idSite
,
'range'
,
$dateRange
,
$archiveSegments
);
$archiveSegments
=
false
;
// do not pre-process segments for period=range #7611
$success
=
$periodArchiveWasSuccessful
&&
$success
;
$periodArchiveWasSuccessful
=
$this
->
archiveReportsFor
(
$idSite
,
'range'
,
$dateRange
,
$archiveSegments
);
$success
=
$periodArchiveWasSuccessful
&&
$success
;
}
}
}
return
$success
;
return
$success
;
}
}
...
@@ -1285,7 +1288,7 @@ class CronArchive
...
@@ -1285,7 +1288,7 @@ class CronArchive
*/
*/
private
function
getDefaultPeriodsToProcess
()
private
function
getDefaultPeriodsToProcess
()
{
{
return
array
(
'day'
,
'week'
,
'month'
,
'year'
);
return
array
(
'day'
,
'week'
,
'month'
,
'year'
,
'range'
);
}
}
/**
/**
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
plugins/CoreConsole/Commands/CoreArchiver.php
+
1
−
1
Voir le fichier @
6ab57de0
...
@@ -100,7 +100,7 @@ class CoreArchiver extends ConsoleCommand
...
@@ -100,7 +100,7 @@ class CoreArchiver extends ConsoleCommand
$command
->
addOption
(
'force-idsites'
,
null
,
InputOption
::
VALUE_OPTIONAL
,
$command
->
addOption
(
'force-idsites'
,
null
,
InputOption
::
VALUE_OPTIONAL
,
'If specified, archiving will be processed only for these Sites Ids (comma separated)'
);
'If specified, archiving will be processed only for these Sites Ids (comma separated)'
);
$command
->
addOption
(
'force-periods'
,
null
,
InputOption
::
VALUE_OPTIONAL
,
$command
->
addOption
(
'force-periods'
,
null
,
InputOption
::
VALUE_OPTIONAL
,
"If specified, archiving will be processed only for these Periods (comma separated eg. day,week,month)"
);
"If specified, archiving will be processed only for these Periods (comma separated eg. day,week,month
,year,range
)"
);
$command
->
addOption
(
'force-date-last-n'
,
null
,
InputOption
::
VALUE_REQUIRED
,
$command
->
addOption
(
'force-date-last-n'
,
null
,
InputOption
::
VALUE_REQUIRED
,
"This script calls the API with period=lastN. You can force the N in lastN by specifying this value."
);
"This script calls the API with period=lastN. You can force the N in lastN by specifying this value."
);
$command
->
addOption
(
'force-date-range'
,
null
,
InputOption
::
VALUE_OPTIONAL
,
$command
->
addOption
(
'force-date-range'
,
null
,
InputOption
::
VALUE_OPTIONAL
,
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter