File tree Expand file tree Collapse file tree 2 files changed +34
-1
lines changed
Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Original file line number Diff line number Diff line change 55 <name >Files</name >
66 <summary >File Management</summary >
77 <description >File Management</description >
8- <version >1.13.0 </version >
8+ <version >1.13.1 </version >
99 <licence >agpl</licence >
1010 <author >Robin Appelman</author >
1111 <author >Vincent Petry</author >
2626 <job >OCA\Files\BackgroundJob\ScanFiles</job >
2727 <job >OCA\Files\BackgroundJob\DeleteOrphanedItems</job >
2828 <job >OCA\Files\BackgroundJob\CleanupFileLocks</job >
29+ <job >OCA\Files\BackgorundJob\CleanupDirectEditingTokens</job >
2930 </background-jobs >
3031
3132 <commands >
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace OCA \Files \BackgroundJob ;
4+
5+ use OC \BackgroundJob \TimedJob ;
6+ use OCP \DirectEditing \IManager ;
7+
8+ class CleanupDirectEditingTokens extends TimedJob {
9+
10+ const INTERVAL_MINUTES = 1 ;
11+
12+ /**
13+ * @var IManager
14+ */
15+ private $ manager ;
16+
17+ public function __construct (IManager $ manager ) {
18+ $ this ->interval = self ::INTERVAL_MINUTES ;
19+ $ this ->manager = $ manager ;
20+ }
21+
22+ /**
23+ * Makes the background job do its work
24+ *
25+ * @param array $argument unused argument
26+ * @throws \Exception
27+ */
28+ public function run ($ argument ) {
29+ $ this ->manager ->cleanup ();
30+ \OC ::$ server ->getLogger ()->error ('CleanupDirectEditing ' );
31+ }
32+ }
You can’t perform that action at this time.
0 commit comments