refactor: sync

Signed-off-by: Pranav C <pranavxc@gmail.com>
This commit is contained in:
Pranav C
2023-10-20 15:58:52 +05:30
parent a4aa258b78
commit 1ec856ec05
5 changed files with 8 additions and 11 deletions

View File

@@ -10,6 +10,7 @@ const props = defineProps<{
const workspaceColor = computed(() => {
const color = props.workspace ? props.workspace.meta?.color || stringToColor(props.workspace.id!) : undefined
return color || '#0A1433'
})

View File

@@ -157,9 +157,8 @@ export enum WorkspaceStatus {
export enum WorkspacePlan {
FREE = 'free',
STANDARD = 'standard',
TEAM = 'team',
BUSINESS = 'business',
BUSINESS_PRO = 'business-pro',
}
export const RoleLabels = {

View File

@@ -61,7 +61,6 @@ export class UtilsController {
@Get([
'/api/v1/db/meta/nocodb/info',
'/api/v2/meta/nocodb/info',
// todo: remove this once we added the health api
'/api/v1/meta/nocodb/info',
])
async appInfo(@Request() req) {

View File

@@ -123,7 +123,7 @@ export class JobsController implements OnModuleInit {
this.closedJobs.push(jobId);
setTimeout(() => {
this.closedJobs = this.closedJobs.filter((j) => j !== jobId);
}, POLLING_INTERVAL * 1.5);
}, POLLING_INTERVAL * 2);
}
break;
}
@@ -184,10 +184,9 @@ export class JobsController implements OnModuleInit {
response = {
status: 'update',
data,
_mid: this.localJobs[jobId]._mid,
_mid: ++this.localJobs[jobId]._mid,
};
this.localJobs[jobId].messages.push(response);
this.localJobs[jobId]._mid += 1;
// limit to 20 messages
if (this.localJobs[jobId].messages.length > 20) {
@@ -233,13 +232,13 @@ export class JobsController implements OnModuleInit {
this.closedJobs.push(jobId);
setTimeout(() => {
this.closedJobs = this.closedJobs.filter((j) => j !== jobId);
}, POLLING_INTERVAL * 1.5);
}, POLLING_INTERVAL * 2);
setTimeout(() => {
delete this.jobRooms[jobId];
delete this.localJobs[jobId];
NocoCache.del(`${CacheScope.JOBS}:${jobId}:messages`);
}, POLLING_INTERVAL);
}, POLLING_INTERVAL * 2);
}
}
@@ -253,11 +252,10 @@ export class JobsController implements OnModuleInit {
response = {
status: 'update',
data,
_mid: this.localJobs[jobId]._mid,
_mid: ++this.localJobs[jobId]._mid,
};
this.localJobs[jobId].messages.push(response);
this.localJobs[jobId]._mid += 1;
// limit to 20 messages
if (this.localJobs[jobId].messages.length > 20) {

View File

@@ -181,7 +181,7 @@ async function localInit({
try {
let response: AxiosResponse<any, any>;
// Login as root user
if (isSuperUser) {
if (isSuperUser && !isEE()) {
// required for configuring license key settings
response = await axios.post('http://localhost:8080/api/v1/auth/user/signin', {
email: `user@nocodb.com`,