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

core: BareosDb::FindLastJobStartTimeForJobAndClient: take into account Running job #1265

Conversation

bruno-at-bareos
Copy link
Contributor

@bruno-at-bareos bruno-at-bareos commented Sep 21, 2022

  • Adding Running jobs to the query will avoid the start of a second backup job for the same client while starttime is overdue.
  • The build binaries have been tested by community members, and the problem hasn't been since then.

Fix [BUG #1466]
[OP #5251]

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

General
  • PR name is meaningful
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
  • Check backport line
  • Is the PR title usable as CHANGELOG entry?
  • Separate commit for CHANGELOG.md ("update CHANGELOG.md"). The PR number is correct.
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR
  • bareos-check-sources --since-merge does not report any problems

@bruno-at-bareos bruno-at-bareos self-assigned this Sep 21, 2022
@bruno-at-bareos bruno-at-bareos marked this pull request as draft September 21, 2022 12:35
@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/master/fix-bug1466-runonconnectinterval-create2jobs branch 6 times, most recently from 08b95b8 to 08f1b94 Compare September 27, 2022 07:48
@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/master/fix-bug1466-runonconnectinterval-create2jobs branch from 08f1b94 to 2f6001f Compare September 29, 2022 11:23
@bruno-at-bareos bruno-at-bareos marked this pull request as ready for review October 6, 2022 15:09
@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/master/fix-bug1466-runonconnectinterval-create2jobs branch from 2f6001f to 60492e1 Compare October 24, 2022 08:10
@pstorz pstorz changed the title core: BareosDb::SqlFindResult take into account Running job core: BareosDb::FindLastJobStartTimeForJobAndClient: take into account Running job Oct 24, 2022
Copy link
Member

@pstorz pstorz left a comment

Choose a reason for hiding this comment

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

I have changed the PR title, as it is not BareosDb::SqlFindResult, but
BareosDb::FindLastJobStartTimeForJobAndClient where the changes werde made. BareosDb::SqlFindResult is the return type.
This is also wrong in the commit comment.

I also changed the comment a bit, I hope that my changes make sense. They are in a separate commit.
Thanks for the good work!

@bruno-at-bareos bruno-at-bareos force-pushed the dev/bruno/master/fix-bug1466-runonconnectinterval-create2jobs branch from 250fa8f to 6e6a185 Compare October 27, 2022 11:35
@bruno-at-bareos
Copy link
Contributor Author

I've rebased on master, plus fixed the commit comment, and also have prepared the CHANGELOG.md line.

bruno-at-bareos and others added 3 commits October 28, 2022 16:11
…t Running job

- Adding Created and Running jobs to the query will avoid the start
  of a second backup job for the same client while starttime is
  overdue.
  As we need to return a time_t and jobstatus = C doesn't have
  starttime set, now() is used with casting forced to expected
  timestamp without DST

Fix [BUG bareos#1466]

Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
Signed-off-by: Bruno Friedmann <bruno.friedmann@bareos.com>
@pstorz pstorz force-pushed the dev/bruno/master/fix-bug1466-runonconnectinterval-create2jobs branch from 6e6a185 to b8865d4 Compare October 28, 2022 14:11
@pstorz pstorz merged commit 5a5e015 into bareos:master Oct 28, 2022
@bruno-at-bareos bruno-at-bareos deleted the dev/bruno/master/fix-bug1466-runonconnectinterval-create2jobs branch November 15, 2022 14:42
@bruno-at-bareos bruno-at-bareos restored the dev/bruno/master/fix-bug1466-runonconnectinterval-create2jobs branch November 15, 2022 14:43
@bruno-at-bareos bruno-at-bareos deleted the dev/bruno/master/fix-bug1466-runonconnectinterval-create2jobs branch November 15, 2022 14:43
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.

None yet

2 participants