Update inputCron.svelte to fix-#5719-Bug Report: Schedule function wi…#473
Closed
Sachin24704 wants to merge 1 commit intoappwrite:mainfrom
Conversation
…th minutes does not work #5719 changed the regex expression to match the cron expression
|
@Sachin24704 is attempting to deploy a commit to the appwrite Team on Vercel. A member of the Team first needs to authorize it. |
2 tasks
Author
stnguyen90
requested changes
Jul 18, 2023
Contributor
stnguyen90
left a comment
There was a problem hiding this comment.
Great PR! 🤯 Unfortunately, it looks like the unit tests failed. Would you please fix the unit tests and also add test cases for the additional values you added.
| let error: string; | ||
|
|
||
| const pattern = String.raw`^[^]+\s+[^]+\s+[^]+\s+[^]+\s+[^]+`; | ||
| const pattern = String.raw`/(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\d+(ns|us|µs|ms|s|m|h))+)|((((\d+,)+\d+|(\d+(\/|-)\d+)|\d+|\*) ?){5,7})/`; |
Contributor
There was a problem hiding this comment.
Regexes are hard to understand and maintain. Would you be able to try and break this apart and add comments to try and help explain it?
Contributor
|
@Sachin24704 are you able to address the comment I made or should I close this? |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
fix- #5719- Bug Report: Schedule function with minutes does not work #5719
changed the regex expression to match the cron expression
What does this PR do?
It fixes the bug that we get when trying to put in double digits in the schedule cron expression for the function.
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
I checked if this regex expression worked seperately by inputting different values
Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
Have you read the Contributing Guidelines on issues?
yes
(Write your answer here.)