Early work on background agent for search

This commit is contained in:
NGPixel
2016-09-04 01:12:42 -04:00
parent 576ba7fde2
commit 528fab6c87
9 changed files with 189 additions and 68 deletions

View File

@@ -19,8 +19,7 @@ module.exports = {
_repo: {
path: '',
branch: 'master',
exists: false,
sync: true
exists: false
},
_signature: {
name: 'Wiki',
@@ -30,6 +29,7 @@ module.exports = {
clone: {},
push: {}
},
onReady: null,
/**
* Initialize Git model
@@ -37,12 +37,10 @@ module.exports = {
* @param {Object} appconfig The application config
* @return {Object} Git model instance
*/
init(appconfig, sync) {
init(appconfig) {
let self = this;
self._repo.sync = sync;
//-> Build repository path
if(_.isEmpty(appconfig.datadir.repo)) {
@@ -53,13 +51,7 @@ module.exports = {
//-> Initialize repository
self._initRepo(appconfig).then((repo) => {
if(self._repo.sync) {
self.resync();
}
});
self.onReady = self._initRepo(appconfig);
// Define signature