@crowdin/app-project-module 0.56.0 → 0.56.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -86,6 +86,7 @@ function filesCron({ config, integration, period, }) {
|
|
|
86
86
|
(0, logger_1.log)(`Starting files cron job with period [${period}]`);
|
|
87
87
|
const syncSettingsList = yield (0, storage_1.getStorage)().getAllSyncSettingsByType('schedule');
|
|
88
88
|
for (const syncSettings of syncSettingsList) {
|
|
89
|
+
let projectData;
|
|
89
90
|
let files = JSON.parse(syncSettings.files);
|
|
90
91
|
let newFiles = [];
|
|
91
92
|
const crowdinCredentials = yield (0, storage_1.getStorage)().getCrowdinCredentials(syncSettings.crowdinId);
|
|
@@ -131,8 +132,14 @@ function filesCron({ config, integration, period, }) {
|
|
|
131
132
|
(0, logger_1.log)(`Subscription expired. Skipping job [${period}] for organization ${crowdinCredentials.id}`);
|
|
132
133
|
continue;
|
|
133
134
|
}
|
|
134
|
-
|
|
135
|
-
.
|
|
135
|
+
try {
|
|
136
|
+
projectData = (yield crowdinClient.projectsGroupsApi.getProject(projectId))
|
|
137
|
+
.data;
|
|
138
|
+
}
|
|
139
|
+
catch (e) {
|
|
140
|
+
(0, logger_1.logError)(e);
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
136
143
|
// eslint-disable-next-line @typescript-eslint/camelcase
|
|
137
144
|
context.jwtPayload.context.project_identifier = projectData.identifier;
|
|
138
145
|
const rootFolder = yield (0, defaults_1.getRootFolder)(config, integration, crowdinClient, projectId);
|
package/package.json
CHANGED