Browse Source

Fixed lint errors

Kristian Vos 4 years ago
parent
commit
a2012d99ee
1 changed files with 5 additions and 5 deletions
  1. 5 5
      backend/logic/tasks.js

+ 5 - 5
backend/logic/tasks.js

@@ -342,21 +342,21 @@ class _TasksModule extends CoreClass {
 	 *
 	 * @returns {Promise} - returns promise (reject, resolve)
 	 */
-	collectStationUsersTask() {
-		return new Promise(async resolve => {
+	async collectStationUsersTask() {
+		const userModel = await DBModule.runJob("GET_MODEL", { modelName: "user" });
+
+		return new Promise(resolve => {
 			TasksModule.log("INFO", "TASK_COLLECT_STATION_USERS_TASK", `Checking for users in stations.`, false);
 
 			const stationsCountUpdated = [];
 			const stationsUpdated = [];
 
-			const oldUsersPerStation = JSON.parse(JSON.stringify(StationsModule.usersPerStation));
+			// const oldUsersPerStation = JSON.parse(JSON.stringify(StationsModule.usersPerStation));
 			const usersPerStation = {};
 
 			const oldUsersPerStationCount = JSON.parse(JSON.stringify(StationsModule.usersPerStationCount));
 			const usersPerStationCount = {};
 
-			const userModel = await DBModule.runJob("GET_MODEL", { modelName: "user" });
-
 			async.each(
 				Object.keys(StationsModule.userList),
 				(socketId, next) => {