• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

LibreSign / libresign / 21362389162

26 Jan 2026 03:01PM UTC coverage: 46.283%. First build
21362389162

Pull #6587

github

web-flow
Merge 8c8ae564c into 507d36d8b
Pull Request #6587: feat: improve async signing error handling

260 of 308 new or added lines in 10 files covered. (84.42%)

7757 of 16760 relevant lines covered (46.28%)

4.99 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

42.86
/lib/Service/SignRequest/StatusCacheService.php
1
<?php
2

3
declare(strict_types=1);
4
/**
5
 * SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
6
 * SPDX-License-Identifier: AGPL-3.0-or-later
7
 */
8

9
namespace OCA\Libresign\Service\SignRequest;
10

11
use OCP\ICache;
12
use OCP\ICacheFactory;
13

14
class StatusCacheService {
15
        public const STATUS_KEY_PREFIX = 'libresign_status_';
16
        public const DEFAULT_TTL = 60;
17

18
        private ICache $cache;
19

20
        public function __construct(ICacheFactory $cacheFactory) {
21
                $this->cache = $cacheFactory->createDistributed('libresign_progress');
48✔
22
        }
23

24
        public function setStatus(string $fileUuid, int $status, int $ttl = self::DEFAULT_TTL): void {
NEW
25
                if ($fileUuid === '') {
×
NEW
26
                        return;
×
27
                }
NEW
28
                $this->cache->set(self::STATUS_KEY_PREFIX . $fileUuid, $status, $ttl);
×
29
        }
30

31
        public function getStatus(string $fileUuid): mixed {
32
                if ($fileUuid === '') {
1✔
33
                        return false;
1✔
34
                }
NEW
35
                return $this->cache->get(self::STATUS_KEY_PREFIX . $fileUuid);
×
36
        }
37
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc