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

fix(scan): fix clocked and scheduled scan not working #182

Merged
merged 4 commits into from
Sep 4, 2024

Conversation

psyray
Copy link
Contributor

@psyray psyray commented Aug 30, 2024

Fixes #181

Periodic and schedule scan are now working again.

There was also an UTC time problem.
So the timezone offset is gathered from the user browser and start datetime of the scan are send to beat in UTC if there's an interval

Tested and working

Thanks to @yogeshojha for his work on yogeshojha/rengine#1313 and yogeshojha/rengine#1328

@psyray psyray added the bug Something isn't working label Aug 30, 2024
@psyray psyray self-assigned this Aug 30, 2024
@psyray psyray linked an issue Aug 30, 2024 that may be closed by this pull request
3 tasks
@AnonymousWP AnonymousWP requested review from a team and removed request for AnonymousWP August 30, 2024 17:35
@0b3ud 0b3ud self-requested a review August 30, 2024 22:25
@0b3ud
Copy link

0b3ud commented Aug 30, 2024

I have tested the features mentioned above

  • Both periodic scan and scheduled scan seem to work for me

  • The scans always ran at the expected time

Only 'one issue' I've noticed and that is the time shown is in UTC but maybe it is normal :
image

@AnonymousWP
Copy link
Member

I have tested the features mentioned above

  • Both periodic scan and scheduled scan seem to work for me
  • The scans always ran at the expected time

Only 'one issue' I've noticed and that is the time shown is in UTC but maybe it is normal : image

I think we should be able to fetch the system date/time from the system quite easily.

@psyray
Copy link
Contributor Author

psyray commented Aug 31, 2024

I have tested the features mentioned above

  • Both periodic scan and scheduled scan seem to work for me
  • The scans always ran at the expected time

Only 'one issue' I've noticed and that is the time shown is in UTC but maybe it is normal : image

I think we should be able to fetch the system date/time from the system quite easily.

I've already did this but it's not reliable as the UI could be in one timezone and the celery in another (for distributed configuration).
So we must rely on the UTC time instead of the local time of the UI

@AnonymousWP
Copy link
Member

AnonymousWP commented Aug 31, 2024

I have tested the features mentioned above

  • Both periodic scan and scheduled scan seem to work for me
  • The scans always ran at the expected time

Only 'one issue' I've noticed and that is the time shown is in UTC but maybe it is normal : image

I think we should be able to fetch the system date/time from the system quite easily.

I've already did this but it's not reliable as the UI could be in one timezone and the celery in another (for distributed configuration). So we must rely on the UTC time instead of the local time of the UI

Hmm, maybe we should set the time on container level then. Also, if we're not going to implement it at all, then at least mention it's UTC, like so:

10:27pm (UTC)

Can just be hardcoded.

@psyray
Copy link
Contributor Author

psyray commented Sep 4, 2024

I have tested the features mentioned above

  • Both periodic scan and scheduled scan seem to work for me
  • The scans always ran at the expected time

Only 'one issue' I've noticed and that is the time shown is in UTC but maybe it is normal : image

I think we should be able to fetch the system date/time from the system quite easily.

I've already did this but it's not reliable as the UI could be in one timezone and the celery in another (for distributed configuration). So we must rely on the UTC time instead of the local time of the UI

Hmm, maybe we should set the time on container level then.

Not possible we will have problem with Celery in the future, for sure.

Also, if we're not going to implement it at all, then at least mention it's UTC, like so:

10:27pm (UTC)

Can just be hardcoded.

I will do that

@psyray
Copy link
Contributor Author

psyray commented Sep 4, 2024

Done
image

Copy link
Member

@AnonymousWP AnonymousWP left a comment

Choose a reason for hiding this comment

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

Approving & merging for now, although I can hardly imagine there's no way of doing this in a practical way. Perhaps in the future we'll come up with a solution.

@AnonymousWP AnonymousWP merged commit 4d35400 into release/2.1.0 Sep 4, 2024
@AnonymousWP AnonymousWP deleted the 181-fix-schedule-scan branch September 4, 2024 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(scan): clocked scan and Periodic Scan are not working
3 participants