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

#149 - Unconfirmed registration older than 24h are now periodically purged #150

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pehala
Copy link
Contributor

@pehala pehala commented Feb 3, 2017

Overview

  • Added Quartz job which will every day at midnight remove all unconfirmed registrations older than 24h.
    • Added Quartz as dependency, used same version as sendMail plugin.
  • Added test to make sure that it removes only registration older than 24h.

Changes in files

BuildConfig.groovy

  • Added Quartz as a dependency.

Config.groovy

  • Added jobs directory to log4j config to allow to write into log.

TestBootStrap.groovy

  • Added 3 not enabled Users with different dateCreated.
    • Had to create User, save it, change dateCreated and save it again, because otherwise grails would override my date.

RegistrationPurgeJob.groovy

  • Quartz job responsible for purging registration.
  • Cron expression itself is untested and unchecked, because I can't test 24h delays, tested it on 10sec delays though.

FilterServiceIntegrationSpec.groovy

  • Updated tests to reflect changes in testing configuration.

RegistrationPurgeJobIntegrationSpec.groovy

  • Integration test responsible for making sure that purge job deletes only the right registrations.

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.

1 participant