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

LibreSign / libresign / 21376434204

26 Jan 2026 10:28PM UTC coverage: 46.331%. First build
21376434204

Pull #6587

github

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

257 of 308 new or added lines in 10 files covered. (83.44%)

7765 of 16760 relevant lines covered (46.33%)

5.04 hits per line

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

14.29
/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');
47✔
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 {
NEW
32
                if ($fileUuid === '') {
×
NEW
33
                        return false;
×
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