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 marking actions with invalid schedules as failed #326

Merged
merged 3 commits into from
Jul 30, 2019

Conversation

thenbrent
Copy link
Contributor

This PR reverts #297 because it would mark the action as failed every time it was fetched, which included things like every time an admin page loads to display the action. The desired behaviour is to mark the action as failed once, when an attempt to run it is undertaken (and that attempt fails). I will introduce that in a separate PR, because it relies on some other improvements to how exceptions are handled when failing to fetch the action.

Because the code from #297 has already been released, I've added a new ActionScheduler_Store_Deprecated class to safely deprecate the public and protected methods being reverted.

@thenbrent thenbrent changed the base branch from version_3_0_0 to master July 11, 2019 11:01
@rrennick
Copy link
Contributor

This will create another merge conflict with #259 so, if we can, hold this one until after #259 is merged.

@thenbrent thenbrent changed the base branch from master to version_3_0_0 July 24, 2019 02:22
@thenbrent thenbrent added this to the 3.0.0 milestone Jul 24, 2019
@thenbrent
Copy link
Contributor Author

I've rebased this one on version_3_0_0 now that #259 has been merged.

Copy link
Contributor

@rrennick rrennick left a comment

Choose a reason for hiding this comment

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

There is one call each to hook/unhook in the unit tests https://github.com/Prospress/action-scheduler/blob/version_3_0_0/tests/phpunit/jobstore/ActionScheduler_wpPostStore_Test.php#L57.

Once those are removed & the 3.0.0 changes, this is good to merge.

deprecated/ActionScheduler_Store_Deprecated.php Outdated Show resolved Hide resolved
deprecated/ActionScheduler_Store_Deprecated.php Outdated Show resolved Hide resolved
deprecated/ActionScheduler_Store_Deprecated.php Outdated Show resolved Hide resolved
@thenbrent
Copy link
Contributor Author

Thanks @rrennick! I've fixed up those issues.

@rrennick rrennick merged commit 0b64982 into version_3_0_0 Jul 30, 2019
@delete-merged-branch delete-merged-branch bot deleted the revert-297-fix/296 branch July 30, 2019 17:34
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.

2 participants