Skip to content

Commit

Permalink
Remove nango worker (#1439)
Browse files Browse the repository at this point in the history
  • Loading branch information
TBonnin authored Dec 20, 2023
1 parent 8a1e865 commit ac0ef2c
Show file tree
Hide file tree
Showing 19 changed files with 22 additions and 1,190 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ jobs:
exit 1
fi
CONTAINER_NAME=nango-worker
WORKER=$(docker ps -q -f status=running -f name=^/${CONTAINER_NAME}$)
if [ ! "${WORKER}" ]; then
echo "Worker container doesn't exist"
CONTAINER_NAME=nango-jobs
JOBS=$(docker ps -q -f status=running -f name=^/${CONTAINER_NAME}$)
if [ ! "${JOBS}" ]; then
echo "Jobs container doesn't exist"
exit 1
fi
shell: bash
221 changes: 1 addition & 220 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"packages/frontend",
"packages/node-client",
"packages/server",
"packages/worker",
"packages/runner",
"packages/jobs"
],
Expand All @@ -19,7 +18,7 @@
"lint": "eslint . --ext .ts,.tsx",
"lint:fix": "eslint . --ext .ts,.tsx --fix",
"install:all": "npm i && cd packages/webapp && npm i && cd ../..",
"ts-build": "tsc -b --clean packages/shared packages/server packages/worker packages/cli packages/runner packages/jobs && tsc -b tsconfig.build.json && tsc -b packages/webapp/tsconfig.json",
"ts-build": "tsc -b --clean packages/shared packages/server packages/cli packages/runner packages/jobs && tsc -b tsconfig.build.json && tsc -b packages/webapp/tsconfig.json",
"docker-build": "docker build -f packages/server/Dockerfile -t nango-server:latest .",
"webapp-build:hosted": "cd ./packages/webapp && npm run build:hosted && cd ../..",
"webapp-build:staging": "cd ./packages/webapp && npm run build:staging && cd ../..",
Expand All @@ -31,15 +30,14 @@
"build:staging": "npm run install:all && npm run ts-build && npm run webapp-build:staging",
"build:prod": "npm run install:all && npm run ts-build && npm run webapp-build:prod",
"server:dev:watch": "cd ./packages/server && npm run dev",
"worker:dev:watch": "cd ./packages/worker && npm run dev",
"jobs:dev:watch": "npm run dev -w @nangohq/nango-jobs",
"webapp:dev:watch": "cd ./packages/webapp && npm run start:hosted",
"cli:watch": "cd ./packages/cli && npm run dev",
"prepare": "husky install",
"build:watch": "tsc -b -w tsconfig.build.json",
"dev:watch": "concurrently --kill-others \"npm run build:watch\" \"npm run webapp-build:watch\" \"npm run prettier-watch\" \"npm run shared:watch\" \"npm run cli:watch\"",
"watch:dev": "npm run dev:watch",
"dev:watch:apps": "concurrently --kill-others \"npm run server:dev:watch\" \"npm run webapp:dev:watch\" \"npm run worker:dev:watch\" \"npm run jobs:dev:watch\"",
"dev:watch:apps": "concurrently --kill-others \"npm run server:dev:watch\" \"npm run webapp:dev:watch\" \"npm run jobs:dev:watch\"",
"watch:dev:apps": "npm run dev:watch:apps",
"dw": "npm run dev:watch",
"dwa": "npm run dev:watch:apps",
Expand Down Expand Up @@ -71,4 +69,4 @@
"@babel/parser": "^7.22.5",
"@babel/traverse": "^7.22.5"
}
}
}
8 changes: 4 additions & 4 deletions packages/cli/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ services:
networks:
- nango

nango-worker:
image: nangohq/nango-worker:0.36.64
container_name: nango-worker
nango-jobs:
image: nangohq/nango-jobs:production
container_name: nango-jobs
restart: always
ports:
- '${WORKER_PORT:-3004}:${WORKER_PORT:-3004}'
Expand All @@ -64,7 +64,7 @@ services:
- nango-db
- temporal
volumes:
- "${NANGO_INTEGRATIONS_LOCATION:-./}:/usr/nango-worker/src/packages/shared/dist/lib/nango-integrations"
- "${NANGO_INTEGRATIONS_LOCATION:-./}:/usr/nango-jobs/src/packages/shared/dist/lib/nango-integrations"
networks:
- nango

Expand Down
3 changes: 0 additions & 3 deletions packages/cli/lib/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,10 @@ export const version = (debug: boolean) => {
const dockerCompose = yaml.load(dockerComposeYaml) as any;

const nangoServerImage = dockerCompose.services['nango-server'].image;
const nangoWorkerImage = dockerCompose.services['nango-worker'].image;

const nangoServerVersion = nangoServerImage.split(':').pop();
const nangoWorkerVersion = nangoWorkerImage.split(':').pop();

console.log(chalk.green('Nango Server version:'), nangoServerVersion);
console.log(chalk.green('Nango Worker version:'), nangoWorkerVersion);
console.log(chalk.green('Nango CLI version:'), packageJson.version);
};

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ program.addHelpText('before', chalk.green(figlet.textSync('Nango CLI')));

program
.command('version')
.description('Print the version of the Nango CLI, Nango Worker, and Nango Server.')
.description('Print the version of the Nango CLI and Nango Server.')
.action(function (this: Command) {
const { debug } = this.opts();
version(debug);
Expand Down
3 changes: 0 additions & 3 deletions packages/worker/.gitignore

This file was deleted.

19 changes: 0 additions & 19 deletions packages/worker/Dockerfile

This file was deleted.

Loading

0 comments on commit ac0ef2c

Please sign in to comment.