-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated getSimpleProjectArea to set site geoIndex, refactored SciStar…
…t project import @schedule tag to be a job
- Loading branch information
1 parent
72d129b
commit a01f83b
Showing
3 changed files
with
24 additions
and
5 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
grails-app/jobs/au/org/ala/ecodata/ImportSciStarterJob.groovy
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package au.org.ala.ecodata | ||
|
||
import grails.core.GrailsApplication | ||
|
||
class ImportSciStarterJob { | ||
|
||
GrailsApplication grailsApplication | ||
ProjectService projectService | ||
|
||
static triggers = { | ||
Boolean enabled = grailsApplication.config.getProperty("sciStarter.importEnabled", Boolean, true) | ||
if (enabled) { | ||
cron name: "every sunday", cronExpression: "0 0 * * 0" | ||
} | ||
} | ||
|
||
def execute() { | ||
projectService.importProjectsFromSciStarter() | ||
} | ||
} |
This file contains 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
This file contains 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