fix cron job not starting
This commit is contained in:
parent
0cb2eddd20
commit
328177c9ff
|
@ -130,6 +130,7 @@ class App extends Component<RouteComponentProps, State> {
|
||||||
ReactGA.pageview(window.location.pathname + window.location.search);
|
ReactGA.pageview(window.location.pathname + window.location.search);
|
||||||
}
|
}
|
||||||
dictionary.initialize().then((r) => {
|
dictionary.initialize().then((r) => {
|
||||||
|
this.networkCronJob.stop();
|
||||||
this.setState({
|
this.setState({
|
||||||
dictionaryStatus: "ready",
|
dictionaryStatus: "ready",
|
||||||
dictionaryInfo: r.dictionaryInfo,
|
dictionaryInfo: r.dictionaryInfo,
|
||||||
|
@ -334,8 +335,8 @@ class App extends Component<RouteComponentProps, State> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private networkCronJob = new CronJob("1/5 * * * *", () => {
|
private networkCronJob = new CronJob("* * * * *", () => {
|
||||||
// TODO: check for new dictionary (in a seperate cron job - not dependant on the user being signed in)
|
// TODO: check for new dictionary (in a seperate cron job - not dependant on the user being signed in)\
|
||||||
this.handleLoadUser();
|
this.handleLoadUser();
|
||||||
sendSubmissions();
|
sendSubmissions();
|
||||||
this.handleDictionaryUpdate();
|
this.handleDictionaryUpdate();
|
||||||
|
|
Loading…
Reference in New Issue