@adminforth/i18n 2.0.0 → 2.0.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.
- package/dist/index.js +1 -1
- package/index.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -487,7 +487,7 @@ export default class I18nPlugin extends AdminForthPlugin {
|
|
|
487
487
|
return null;
|
|
488
488
|
}
|
|
489
489
|
const backgroundJobsPlugin = this.adminforth.getPluginByClassName('BackgroundJobsPlugin');
|
|
490
|
-
backgroundJobsPlugin.
|
|
490
|
+
backgroundJobsPlugin.updateJobFieldsAtomically(jobId, () => __awaiter(this, void 0, void 0, function* () {
|
|
491
491
|
// do all set / get fields in this function to make state update atomic and there is no conflicts when 2 tasks in parallel do get before set.
|
|
492
492
|
// don't do long awaits in this callback, since it has exclusive lock.
|
|
493
493
|
let totalUsedTokens = yield backgroundJobsPlugin.getJobField(jobId, 'totalUsedTokens');
|
package/index.ts
CHANGED
|
@@ -574,7 +574,7 @@ export default class I18nPlugin extends AdminForthPlugin {
|
|
|
574
574
|
|
|
575
575
|
const backgroundJobsPlugin = this.adminforth.getPluginByClassName<any>('BackgroundJobsPlugin');
|
|
576
576
|
|
|
577
|
-
backgroundJobsPlugin.
|
|
577
|
+
backgroundJobsPlugin.updateJobFieldsAtomically(jobId, async () => {
|
|
578
578
|
// do all set / get fields in this function to make state update atomic and there is no conflicts when 2 tasks in parallel do get before set.
|
|
579
579
|
// don't do long awaits in this callback, since it has exclusive lock.
|
|
580
580
|
let totalUsedTokens = await backgroundJobsPlugin.getJobField(jobId, 'totalUsedTokens');
|