Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions packages/apps/job-launcher/server/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,3 @@ PAYMENT_PROVIDER_APP_INFO_URL=http://local.app

# Sendgrid
SENDGRID_API_KEY=sendgrid-disabled

# Vision
GOOGLE_PROJECT_ID=disabled
GOOGLE_PRIVATE_KEY=disabled
GOOGLE_CLIENT_EMAIL=disabled
GCV_MODERATION_RESULTS_FILES_PATH=disabled
GCV_MODERATION_RESULTS_BUCKET=disabled

# Slack
SLACK_ABUSE_NOTIFICATION_WEBHOOK_URL=disabled
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import { S3ConfigService } from './s3-config.service';
import { SendgridConfigService } from './sendgrid-config.service';
import { PaymentProviderConfigService } from './payment-provider-config.service';
import { Web3ConfigService } from './web3-config.service';
import { SlackConfigService } from './slack-config.service';
import { VisionConfigService } from './vision-config.service';

@Global()
@Module({
Expand All @@ -28,8 +26,6 @@ import { VisionConfigService } from './vision-config.service';
CvatConfigService,
PGPConfigService,
NetworkConfigService,
SlackConfigService,
VisionConfigService,
],
exports: [
ConfigService,
Expand All @@ -43,8 +39,6 @@ import { VisionConfigService } from './vision-config.service';
CvatConfigService,
PGPConfigService,
NetworkConfigService,
SlackConfigService,
VisionConfigService,
],
})
export class EnvConfigModule {}
13 changes: 0 additions & 13 deletions packages/apps/job-launcher/server/src/common/config/env-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ export const envValidator = Joi.object({
SENDGRID_API_KEY: Joi.string().required(),
SENDGRID_FROM_EMAIL: Joi.string(),
SENDGRID_FROM_NAME: Joi.string(),
// CVAT
CVAT_JOB_SIZE: Joi.string(),
CVAT_MAX_TIME: Joi.string(),
CVAT_VAL_SIZE: Joi.string(),
CVAT_SKELETONS_JOB_SIZE_MULTIPLIER: Joi.string(),
//PGP
PGP_ENCRYPT: Joi.boolean(),
PGP_PRIVATE_KEY: Joi.string().optional(),
Expand All @@ -82,12 +77,4 @@ export const envValidator = Joi.object({
//COIN API KEYS
RATE_CACHE_TIME: Joi.number().optional(),
COINGECKO_API_KEY: Joi.string().optional(),
// Google
GOOGLE_PROJECT_ID: Joi.string().required(),
GOOGLE_PRIVATE_KEY: Joi.string().required(),
GOOGLE_CLIENT_EMAIL: Joi.string().required(),
GCV_MODERATION_RESULTS_FILES_PATH: Joi.string().required(),
GCV_MODERATION_RESULTS_BUCKET: Joi.string().required(),
// Slack
SLACK_ABUSE_NOTIFICATION_WEBHOOK_URL: Joi.string().required(),
});

This file was deleted.

This file was deleted.

17 changes: 0 additions & 17 deletions packages/apps/job-launcher/server/src/common/constants/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,6 @@ export enum ErrorJob {
NoRefundFound = 'No refund found for this escrow',
}

/**
* Represents error messages associated with a job moderation.
*/
export enum ErrorContentModeration {
ErrorProcessingDataset = 'Error processing dataset',
InappropriateContent = 'Job cannot be processed due to inappropriate content',
ContentModerationFailed = 'Job cannot be processed due to failure in content moderation',
NoDestinationURIFound = 'No destination URI found in the response',
InvalidBucketUrl = 'Invalid bucket URL',
DataMustBeStoredInGCS = 'Data must be stored in Google Cloud Storage',
NoResultsFound = 'No results found',
ResultsParsingFailed = 'Results parsing failed',
JobModerationFailed = 'Job moderation failed',
ProcessContentModerationRequestFailed = 'Process content moderation request failed',
CompleteContentModerationFailed = 'Complete content moderation failed',
}

/**
* Represents error messages associated to webhook.
*/
Expand Down
14 changes: 11 additions & 3 deletions packages/apps/job-launcher/server/src/common/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ export const LOGOUT_PATH = '/auth/logout';

export const MUTEX_TIMEOUT = 2000; //ms

export const GS_PROTOCOL = 'gs://';
export const GCV_CONTENT_MODERATION_ASYNC_BATCH_SIZE = 100;
export const GCV_CONTENT_MODERATION_BATCH_SIZE_PER_TASK = 2000;
/**
* Regex for GCS URL in subdomain format: https://<bucket>.storage.googleapis.com/<object_path>
*/
export const GCS_HTTP_REGEX_SUBDOMAIN =
/^https:\/\/([a-zA-Z0-9\-.]+)\.storage\.googleapis\.com\/?(.*)$/;

/**
* Regex for GCS URL in path-based format: https://storage.googleapis.com/<bucket>/<object_path>
*/
export const GCS_HTTP_REGEX_PATH_BASED =
/^https:\/\/storage\.googleapis\.com\/([^/]+)\/?(.*)$/;

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export enum CronJobType {
ContentModeration = 'content-moderation',
CreateEscrow = 'create-escrow',
CancelEscrow = 'cancel-escrow',
ProcessPendingWebhook = 'process-pending-webhook',
Expand Down
9 changes: 0 additions & 9 deletions packages/apps/job-launcher/server/src/common/enums/gcv.ts

This file was deleted.

3 changes: 0 additions & 3 deletions packages/apps/job-launcher/server/src/common/enums/job.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
export enum JobStatus {
PAID = 'paid',
UNDER_MODERATION = 'under_moderation',
MODERATION_PASSED = 'moderation_passed',
POSSIBLE_ABUSE_IN_REVIEW = 'possible_abuse_in_review',
LAUNCHED = 'launched',
PARTIAL = 'partial',
COMPLETED = 'completed',
Expand Down
Loading
Loading