Browse Source

Move Job to a better class name

remotes/origin/stand-alone-job-executer
Joas Schilling 10 years ago
parent
commit
db2e9df5f0
No known key found for this signature in database GPG Key ID: 70A0B324C41C0946
  1. 4
      apps/user_ldap/appinfo/info.xml
  2. 8
      apps/user_ldap/lib/Jobs/UpdateGroups.php
  3. 4
      lib/private/Repair/DropOldJobs.php

4
apps/user_ldap/appinfo/info.xml

@ -24,7 +24,7 @@ A user logs into ownCloud with their LDAP or AD credentials, and is granted acce
<namespace>User_LDAP</namespace>
<background-jobs>
<job>OCA\user_ldap\lib\Jobs</job>
<job>\OCA\User_LDAP\Jobs\CleanUp</job>
<job>OCA\user_ldap\Jobs\UpdateGroups</job>
<job>OCA\User_LDAP\Jobs\CleanUp</job>
</background-jobs>
</info>

8
apps/user_ldap/lib/jobs.php → apps/user_ldap/lib/Jobs/UpdateGroups.php

@ -26,8 +26,10 @@
*
*/
namespace OCA\user_ldap\lib;
namespace OCA\User_LDAP\Jobs;
use OCA\User_LDAP\Access;
use OCA\User_LDAP\Connection;
use OCA\User_LDAP\FilesystemHelper;
use OCA\User_LDAP\Helper;
use OCA\User_LDAP\LDAP;
@ -36,7 +38,7 @@ use OCA\User_LDAP\Mapping\GroupMapping;
use OCA\User_LDAP\Mapping\UserMapping;
use OCA\User_LDAP\User\Manager;
class Jobs extends \OC\BackgroundJob\TimedJob {
class UpdateGroups extends \OC\BackgroundJob\TimedJob {
static private $groupsFromDB;
static private $groupBE;
@ -50,7 +52,7 @@ class Jobs extends \OC\BackgroundJob\TimedJob {
* @param mixed $argument
*/
public function run($argument){
Jobs::updateGroups();
self::updateGroups();
}
static public function updateGroups() {

4
lib/private/Repair/DropOldJobs.php

@ -73,8 +73,12 @@ class DropOldJobs implements IRepairStep {
['class' => 'OC_Cache_FileGlobalGC', 'arguments' => null],
['class' => 'OC\Cache\FileGlobalGC', 'arguments' => null],
['class' => 'OCA\Files\BackgroundJob\DeleteOrphanedTagsJob', 'arguments' => null],
['class' => 'OCA\Files_sharing\Lib\DeleteOrphanedSharesJob', 'arguments' => null],
['class' => 'OCA\Files_sharing\ExpireSharesJob', 'arguments' => null],
['class' => 'OCA\user_ldap\lib\Jobs', 'arguments' => null],
['class' => '\OCA\User_LDAP\Jobs\CleanUp', 'arguments' => null],
];
}

Loading…
Cancel
Save