mirror of https://github.com/Requarks/wiki.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
636 B
20 lines
636 B
require('../core/worker')
|
|
|
|
/* global WIKI */
|
|
|
|
module.exports = async (job) => {
|
|
WIKI.logger.info(`Syncing with storage provider ${job.data.target.title}...`)
|
|
|
|
try {
|
|
const target = require(`../modules/storage/${job.data.target.key}/storage.js`)
|
|
target[job.data.event].call({
|
|
config: job.data.target.config,
|
|
mode: job.data.target.mode,
|
|
page: job.data.page
|
|
})
|
|
WIKI.logger.info(`Syncing with storage provider ${job.data.target.title}: [ COMPLETED ]`)
|
|
} catch (err) {
|
|
WIKI.logger.error(`Syncing with storage provider ${job.data.target.title}: [ FAILED ]`)
|
|
WIKI.logger.error(err.message)
|
|
}
|
|
}
|