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: Allow fingerprint function to return execution status #303

Merged

Conversation

TheoD02
Copy link
Contributor

@TheoD02 TheoD02 commented Mar 1, 2024

Description:

This change adds the feature of returning true if the callback was executed and false otherwise, allowing streamlined conditional execution.

Usage:

$hasRun = fingerprint(fn () => echo "my fingerprinted task", fingerprint: $uniqueFingerprint, force: $forceExecution);
if ($hasRun === false) {
    doSomethingWhenHasNotRunned();
}

Enhances code readability for managing fingerprinted tasks.

Copy link
Member

@lyrixx lyrixx left a comment

Choose a reason for hiding this comment

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

👍🏼 Thanks.

Just let one minor question

src/functions.php Outdated Show resolved Hide resolved
@TheoD02 TheoD02 force-pushed the fix/add_return_status_for_fingerprint branch 2 times, most recently from 14767e5 to 6c64f61 Compare March 4, 2024 12:28
@TheoD02 TheoD02 force-pushed the fix/add_return_status_for_fingerprint branch from 6c64f61 to 637c5c5 Compare March 4, 2024 14:06
@TheoD02
Copy link
Contributor Author

TheoD02 commented Mar 4, 2024

Done 👍 😄

Copy link
Member

@pyrech pyrech left a comment

Choose a reason for hiding this comment

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

Awesome, thanks 🎉

Copy link
Member

@lyrixx lyrixx left a comment

Choose a reason for hiding this comment

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

👍 thanks

@lyrixx lyrixx merged commit 6200a68 into jolicode:main Mar 4, 2024
8 checks passed
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

3 participants