Skip to content
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

add last_checked, reserved_at and execution_duration to cc background:queue:status #40113

Merged
merged 1 commit into from
Jun 21, 2022

Conversation

mrow4a
Copy link
Contributor

@mrow4a mrow4a commented May 31, 2022

BEFORE:

root@93b6da3d89fa: /var/www/owncloud # occ background:queue:status
+--------+----------------------------------------------------+---------------------------+---------------+
| Job ID | Job                                                | Last Run                  | Job Arguments |
+--------+----------------------------------------------------+---------------------------+---------------+
| 1      | OCA\Files\BackgroundJob\ScanFiles                  | 1970-01-01T00:00:00+00:00 |               |
| 2      | OCA\Files\BackgroundJob\DeleteOrphanedItems        | 1970-01-01T00:00:00+00:00 |               |
| 3      | OCA\Files\BackgroundJob\CleanupFileLocks           | 1970-01-01T00:00:00+00:00 |               |
| 4      | OCA\Files\BackgroundJob\CleanupPersistentFileLocks | 1970-01-01T00:00:00+00:00 |               |
| 5      | OCA\DAV\CardDAV\SyncJob                            | 1970-01-01T00:00:00+00:00 |               |
| 6      | OCA\DAV\BackgroundJob\CleanProperties              | 1970-01-01T00:00:00+00:00 |               |
| 7      | OCA\Activity\BackgroundJob\EmailNotification       | 1970-01-01T00:00:00+00:00 |               |
| 8      | OCA\Activity\BackgroundJob\ExpireActivities        | 1970-01-01T00:00:00+00:00 |               |
| 9      | OCA\Federation\SyncJob                             | 1970-01-01T00:00:00+00:00 |               |
| 10     | OCA\Files_Sharing\DeleteOrphanedSharesJob          | 1970-01-01T00:00:00+00:00 |               |
| 11     | OCA\Files_Sharing\ExpireSharesJob                  | 1970-01-01T00:00:00+00:00 |               |
| 12     | OCA\Files_Sharing\External\ScanExternalSharesJob   | 1970-01-01T00:00:00+00:00 |               |
| 13     | OCA\Files_Trashbin\BackgroundJob\ExpireTrash       | 1970-01-01T00:00:00+00:00 |               |
| 14     | OCA\Files_Versions\BackgroundJob\ExpireVersions    | 1970-01-01T00:00:00+00:00 |               |
| 15     | OCA\Market\CheckUpdateBackgroundJob                | 1970-01-01T00:00:00+00:00 |               |
| 16     | OCA\UpdateNotification\Notification\BackgroundJob  | 1970-01-01T00:00:00+00:00 |               |
| 17     | OC\Authentication\Token\DefaultTokenCleanupJob     | 1970-01-01T00:00:00+00:00 |               |
+--------+----------------------------------------------------+---------------------------+---------------+

AFTER:

+--------+----------------------------------------------------+---------------+---------------------------+---------------------------+---------------------------+------------------------+
| Job ID | Job                                                | Job Arguments | Last Run                  | Last Checked              | Reserved At               | Execution Duration (s) |
+--------+----------------------------------------------------+---------------+---------------------------+---------------------------+---------------------------+------------------------+
| 1      | OCA\Files\BackgroundJob\ScanFiles                  |               | N/A                       | 2022-05-31T19:17:05+00:00 | 2022-05-31T19:17:05+00:00 | N/A                    |
| 2      | OCA\Files\BackgroundJob\DeleteOrphanedItems        |               | N/A                       | 2022-05-31T19:18:07+00:00 | 2022-05-31T19:18:07+00:00 | N/A                    |
| 3      | OCA\Files\BackgroundJob\CleanupFileLocks           |               | N/A                       | 2022-05-31T19:19:05+00:00 | 2022-05-31T19:19:05+00:00 | N/A                    |
| 4      | OCA\Files\BackgroundJob\CleanupPersistentFileLocks |               | N/A                       | 2022-05-31T19:20:04+00:00 | 2022-05-31T19:20:04+00:00 | N/A                    |
| 5      | OCA\DAV\CardDAV\SyncJob                            |               | N/A                       | 2022-05-31T19:21:06+00:00 | 2022-05-31T19:21:06+00:00 | N/A                    |
| 6      | OCA\DAV\BackgroundJob\CleanProperties              |               | N/A                       | 2022-05-31T19:22:05+00:00 | 2022-05-31T19:22:05+00:00 | N/A                    |
| 7      | OCA\Activity\BackgroundJob\EmailNotification       |               | N/A                       | 2022-05-31T19:23:05+00:00 | 2022-05-31T19:23:05+00:00 | N/A                    |
| 8      | OCA\Activity\BackgroundJob\ExpireActivities        |               | 2022-05-31T19:24:05+00:00 | 2022-05-31T19:40:06+00:00 | N/A                       | 0                      |
| 9      | OCA\Federation\SyncJob                             |               | 2022-05-31T19:24:05+00:00 | 2022-05-31T19:40:06+00:00 | N/A                       | 0                      |
| 10     | OCA\Files_Sharing\DeleteOrphanedSharesJob          |               | 2022-05-31T19:40:06+00:00 | 2022-05-31T19:40:06+00:00 | N/A                       | 0                      |
| 11     | OCA\Files_Sharing\ExpireSharesJob                  |               | 2022-05-31T19:24:05+00:00 | 2022-05-31T19:40:06+00:00 | N/A                       | 0                      |
| 12     | OCA\Files_Sharing\External\ScanExternalSharesJob   |               | 2022-05-31T19:35:06+00:00 | 2022-05-31T19:40:06+00:00 | N/A                       | 0                      |
| 13     | OCA\Files_Trashbin\BackgroundJob\ExpireTrash       |               | 2022-05-31T19:35:06+00:00 | 2022-05-31T19:40:06+00:00 | N/A                       | 0                      |
| 14     | OCA\Files_Versions\BackgroundJob\ExpireVersions    |               | 2022-05-31T19:24:05+00:00 | 2022-05-31T19:40:06+00:00 | N/A                       | 0                      |
| 15     | OCA\Market\CheckUpdateBackgroundJob                |               | 2022-05-31T19:24:05+00:00 | 2022-05-31T19:40:06+00:00 | N/A                       | 2                      |
| 16     | OCA\UpdateNotification\Notification\BackgroundJob  |               | 2022-05-31T19:24:07+00:00 | 2022-05-31T19:40:06+00:00 | N/A                       | 0                      |
| 17     | OC\Authentication\Token\DefaultTokenCleanupJob     |               | 2022-05-31T19:40:06+00:00 | 2022-05-31T19:40:06+00:00 | N/A                       | 0                      |
+--------+----------------------------------------------------+---------------+---------------------------+---------------------------+---------------------------+------------------------+

Description

Complete occ command output with all available job attributes

Related Issue

How Has This Been Tested?

  • executing occ background:queue:status in all possible combinations

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Changelog item, see TEMPLATE

@update-docs
Copy link

update-docs bot commented May 31, 2022

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@mrow4a mrow4a force-pushed the e5205-feature-background-status branch from aa01a01 to f97cccb Compare May 31, 2022 19:45
@mrow4a mrow4a changed the title WIP: add last_checked, reserved_at and execution_duration to cc background:queue:status add last_checked, reserved_at and execution_duration to cc background:queue:status Jun 1, 2022
@mrow4a mrow4a requested a review from DeepDiver1975 June 1, 2022 06:12
@mrow4a mrow4a self-assigned this Jun 1, 2022
Copy link
Member

@DeepDiver1975 DeepDiver1975 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments

lib/public/BackgroundJob/IJob.php Outdated Show resolved Hide resolved
Copy link
Member

@DeepDiver1975 DeepDiver1975 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...

lib/private/BackgroundJob/Job.php Outdated Show resolved Hide resolved
@mrow4a mrow4a force-pushed the e5205-feature-background-status branch from 6ddbdf9 to 514d98c Compare June 6, 2022 19:32
@mmattel
Copy link
Contributor

mmattel commented Jun 20, 2022

@mrow4a you may need to rebase to check if CI is happy. We are going to have a 10.11 release, this would be a perfect time to finish and merge this PR.

@mrow4a mrow4a force-pushed the e5205-feature-background-status branch 2 times, most recently from 9e7d931 to cab79cf Compare June 20, 2022 12:33
@mrow4a
Copy link
Contributor Author

mrow4a commented Jun 20, 2022

@DeepDiver1975 completed gaps in unit tests complaining about types. Ready for re-review so that we can fit it in 10.11 release

P.S. It was very good idea to add types, it has shown many incomplete unit tests and forced to make sure logic is correct

Copy link
Contributor

@phil-davis phil-davis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a changelog entry

@mrow4a mrow4a requested a review from phil-davis June 20, 2022 13:47
@phil-davis
Copy link
Contributor

https://drone.owncloud.com/owncloud/core/36094/4/2
file changelog/unreleased/40113: title is too long

@phil-davis
Copy link
Contributor

I will rebase, squash and adjust the changelog...

@phil-davis phil-davis force-pushed the e5205-feature-background-status branch from c0eafb5 to 32895eb Compare June 20, 2022 15:07
@sonarcloud
Copy link

sonarcloud bot commented Jun 20, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@mrow4a mrow4a merged commit 2b4ad01 into master Jun 21, 2022
@delete-merged-branch delete-merged-branch bot deleted the e5205-feature-background-status branch June 21, 2022 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants