-
Notifications
You must be signed in to change notification settings - Fork 35
feat(Assignments) #522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
marcelklehr
wants to merge
22
commits into
main
Choose a base branch
from
feat/assignments
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat(Assignments) #522
Changes from 13 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
a644bef
feat(Assignments): First pass
marcelklehr 76bc21d
refactor: Introduce ChatService
marcelklehr f62c60a
feat(Assignments): Implement creating and running assignments
marcelklehr 882d471
feat(Assignments): Implement recurrence rule checking
marcelklehr 71bf6f9
fix(Assignments): Minor fixes to get things to run
marcelklehr 046cdac
fix(Assignments): Minor fixes to get things to run
marcelklehr 66c47d7
fix(Assignments): Minor fixes to get things to run
marcelklehr dec32dc
fix(Assignments): Minor fixes to get things to run
marcelklehr cf1af7f
fix(Assignments): Set RunAssignmentsJob to 10min
marcelklehr 2f5c288
fix: Run cs:fix
marcelklehr 1860b0e
fix: Fix psalm issues
marcelklehr 3752b4d
fix: Fix openapi spec
marcelklehr 4c9a7ea
fix: Fix REUSE compliance
marcelklehr dea9faf
Apply suggestions from code review
marcelklehr c044d78
fix: Address review comments
marcelklehr 04c77fa
fix: Address review comments
marcelklehr e993dbb
fix: Regenerate openapi spec
marcelklehr 5a1bfe3
Fix: Address review comment
marcelklehr 109fb62
Fix: Address review comment
marcelklehr 0e8ea5d
Apply suggestions from code review
marcelklehr 48d4c82
fix: Address review comments
marcelklehr e483ae2
fix: Address review comments
marcelklehr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| /** | ||
| * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors | ||
| * SPDX-License-Identifier: AGPL-3.0-or-later | ||
| */ | ||
|
|
||
| namespace OCA\Assistant\BackgroundJob; | ||
|
|
||
| use OCA\Assistant\Service\AssignmentsService; | ||
| use OCA\Assistant\Service\InternalException; | ||
| use OCP\AppFramework\Utility\ITimeFactory; | ||
| use OCP\BackgroundJob\TimedJob; | ||
| use Psr\Log\LoggerInterface; | ||
|
|
||
| class RunAssignmentsJob extends TimedJob { | ||
| public function __construct( | ||
| ITimeFactory $timeFactory, | ||
| private AssignmentsService $assignmentService, | ||
| private LoggerInterface $logger, | ||
| ) { | ||
| parent::__construct($timeFactory); | ||
| $this->setAllowParallelRuns(true); | ||
| $this->setTimeSensitivity(self::TIME_SENSITIVE); | ||
| $this->setInterval(60 * 10); // 10min | ||
| } | ||
| public function run($argument) { | ||
| $userId = $argument['userId']; | ||
| try { | ||
| $this->assignmentService->runDueAssignmentsForUser($userId); | ||
| } catch (InternalException $e) { | ||
| $this->logger->error('Error running assignments for user ' . $userId, ['exception' => $e]); | ||
| } | ||
| } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.