Nextcloud Circles API

MaintenanceService
in package
Uses TNCLogger

Class MaintenanceService

Table of Contents

TIMEOUT  = 18000
$ALERT  : mixed
$CRITICAL  : mixed
$DEBUG  : mixed
$DELAY  : mixed
$EMERGENCY  : mixed
$ERROR  : mixed
$INFO  : mixed
$NOTICE  : mixed
$WARNING  : mixed
$circleRequest  : CircleRequest
$circleService  : CircleService
$configService  : ConfigService
$eventWrapperService  : EventWrapperService
$federatedUserService  : FederatedUserService
$groupManager  : IGroupManager
$memberRequest  : MemberRequest
$membershipService  : MembershipService
$output  : OutputInterface
$shareWrapperRequest  : ShareWrapperRequest
$shareWrapperService  : ShareWrapperService
$syncService  : SyncService
$userManager  : IUserManager
__construct()  : mixed
MaintenanceService constructor.
alert()  : void
debug()  : void
e()  : void
emergency()  : void
exception()  : void
log()  : void
logger()  : LoggerInterface
notice()  : void
runMaintenance()  : void
level=1 -> run every minute level=2 -> run every 5 minutes level=3 -> run every hour level=4 -> run every day level=5 -> run every week
runMaintenances()  : void
should only be called from a BackgroundJob
setOccOutput()  : void
t()  : void
throwable()  : void
warning()  : void
canRunLevel()  : bool
fixSubCirclesDisplayName()  : void
lockMaintenanceRun()  : void
output()  : void
refreshDisplayName()  : void
removeCirclesWithNoOwner()  : void
removeDeprecatedShares()  : void
removeMembersWithNoCircles()  : void
removeOrphanShares()  : void
runMaintenance1()  : void
every minute
runMaintenance2()  : void
every 10 minutes
runMaintenance3()  : void
every hour
runMaintenance4()  : void
every day
runMaintenance5()  : void
every week
updateAllMemberships()  : void

Constants

Properties

$DELAY

public static mixed $DELAY = [ 1 => 60, // every minute 2 => 300, // every 5 minutes 3 => 3600, // every hour 4 => 75400, // every day 5 => 432000, ]

$EMERGENCY

public static mixed $EMERGENCY = 4

Methods

__construct()

MaintenanceService constructor.

public __construct(IUserManager $userManager, IGroupManager $groupManager, CircleRequest $circleRequest, MemberRequest $memberRequest, ShareWrapperRequest $shareWrapperRequest, SyncService $syncService, FederatedUserService $federatedUserService, ShareWrapperService $shareWrapperService, MembershipService $membershipService, EventWrapperService $eventWrapperService, CircleService $circleService, ConfigService $configService) : mixed
Parameters
$userManager : IUserManager
$groupManager : IGroupManager
$circleRequest : CircleRequest
$memberRequest : MemberRequest
$shareWrapperRequest : ShareWrapperRequest
$syncService : SyncService
$federatedUserService : FederatedUserService
$shareWrapperService : ShareWrapperService
$membershipService : MembershipService
$eventWrapperService : EventWrapperService
$circleService : CircleService
$configService : ConfigService
Return values
mixed

alert()

public alert(string $message[, bool $trace = false ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
$message : string
$trace : bool = false
$serializable : array<string|int, mixed> = []
Return values
void

debug()

public debug(string $message[, array<string|int, mixed> $serializable = [] ]) : void
Parameters
$message : string
$serializable : array<string|int, mixed> = []
Return values
void

e()

public e(Exception $e[, array<string|int, mixed> $serializable = [] ]) : void
Parameters
$e : Exception
$serializable : array<string|int, mixed> = []
Return values
void

emergency()

public emergency(string $message[, bool $trace = false ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
$message : string
$trace : bool = false
$serializable : array<string|int, mixed> = []
Return values
void

exception()

public exception(Exception $e[, int|array<string|int, mixed> $level = 3 ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
$e : Exception
$level : int|array<string|int, mixed> = 3
$serializable : array<string|int, mixed> = []
Return values
void

log()

public log(int $level, string $message[, bool $trace = false ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
$level : int
$message : string
$trace : bool = false
$serializable : array<string|int, mixed> = []
Return values
void

logger()

public logger() : LoggerInterface
Return values
LoggerInterface

notice()

public notice(string $message[, bool $trace = false ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
$message : string
$trace : bool = false
$serializable : array<string|int, mixed> = []
Return values
void

runMaintenance()

level=1 -> run every minute level=2 -> run every 5 minutes level=3 -> run every hour level=4 -> run every day level=5 -> run every week

public runMaintenance(int $level[, bool $forceRefresh = false ]) : void
Parameters
$level : int
$forceRefresh : bool = false
Tags
throws
MaintenanceException
Return values
void

runMaintenances()

should only be called from a BackgroundJob

public runMaintenances([bool $heavy = false ]) : void
Parameters
$heavy : bool = false
  • set to true to run heavy maintenance process.
Return values
void

setOccOutput()

public setOccOutput(OutputInterface $output) : void
Parameters
$output : OutputInterface
Return values
void

t()

public t(Throwable $t[, array<string|int, mixed> $serializable = [] ]) : void
Parameters
$t : Throwable
$serializable : array<string|int, mixed> = []
Return values
void

throwable()

public throwable(Throwable $t[, int $level = 3 ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
$t : Throwable
$level : int = 3
$serializable : array<string|int, mixed> = []
Return values
void

warning()

public warning(string $message[, bool $trace = false ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
$message : string
$trace : bool = false
$serializable : array<string|int, mixed> = []
Return values
void

output()

private output(string $message) : void
Parameters
$message : string
Return values
void

removeMembersWithNoCircles()

private removeMembersWithNoCircles() : void
Return values
void

removeOrphanShares()

private removeOrphanShares() : void
Return values
void

runMaintenance1()

every minute

private runMaintenance1([bool $forceRefresh = false ]) : void
Parameters
$forceRefresh : bool = false
Return values
void

runMaintenance2()

every 10 minutes

private runMaintenance2([bool $forceRefresh = false ]) : void
Parameters
$forceRefresh : bool = false
Return values
void

runMaintenance3()

every hour

private runMaintenance3([bool $forceRefresh = false ]) : void
Parameters
$forceRefresh : bool = false
Return values
void

runMaintenance4()

every day

private runMaintenance4([bool $forceRefresh = false ]) : void
Parameters
$forceRefresh : bool = false
Return values
void

runMaintenance5()

every week

private runMaintenance5([bool $forceRefresh = false ]) : void
Parameters
$forceRefresh : bool = false
Return values
void

Search results