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

Add default schedule config for sitemap_generate job #14822

Merged
merged 3 commits into from
Apr 28, 2018

Conversation

jameshalsall
Copy link

@jameshalsall jameshalsall commented Apr 23, 2018

Description

There was no default schedule configuration for sitemap_generate job, and I think this is causing confusion for some people.

Also I have removed a redundant constant in the sitemap observer.

I think more work is required on sitemaps following this.

Fixed Issues (if relevant)

  1. Magento 2.0.7 XML sitemap is not generated by schedule #5768: Magento 2.0.7 XML sitemap is not generated by schedule (potentially, waiting feedback from creator)

Manual testing scenarios

  1. Create sitemap via admin
  2. Do not sitemap generation schedule settings in Store > Configuration > Catalog > XML Sitemap > Generation Settings
  3. Configure magento cron
  4. Sitemap should be updated at midnight.

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@magento-engcom-team
Copy link
Contributor

@jameshalsall thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.

@jameshalsall jameshalsall removed the wip label Apr 24, 2018
@jameshalsall jameshalsall changed the title Run the sitemap_generate cron job correctly Add default schedule config for sitemap_generate job Apr 24, 2018
/**
* Cronjob expression configuration
*/
const XML_PATH_CRON_EXPR = 'crontab/default/jobs/generate_sitemaps/schedule/cron_expr';
Copy link
Contributor

Choose a reason for hiding this comment

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

I would suggest to deprecate this instead of removing

Copy link
Author

Choose a reason for hiding this comment

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

I would agree, but a) Magento does not follow semantic versioning between marketing releases and b) it points at the wrong config path so it's incredibly unlikely this is used anywhere directly.

Copy link
Contributor

Choose a reason for hiding this comment

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

In any way it is better to stay on a safe side and follow conventions where possible.

@jameshalsall
Copy link
Author

Travis failure is unrelated.

@ishakhsuvarov
Copy link
Contributor

@jameshalsall Please use you own fork for to submit the Pull Request, instead of magento/magento2

@jameshalsall
Copy link
Author

Yeah I pushed to the main repository by mistake 🤦‍♂️

@magento-engcom-team
Copy link
Contributor

Hi @jameshalsall. Thank you for your contribution.
Changes from your Pull Request will be available with the upcoming 2.2.5 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants