mirror of
https://github.com/FlowiseAI/Flowise.git
synced 2026-10-12 02:02:17 +00:00
* feat(database.util.ts): add function to check if column exists in table * feat(migrations): add permission column to apikey table * chore(services/apikey): remove auto-create default API key * chore: remove auto-create default API key * fix(migrations): rename permission to permissions in apikey table * feat(services/apikey): add permissions to create and update * feat(views/apikey): add permissions to create and update * feat(api): use API key permissions instead of role permissions * feat(permissions): filter by user.permissions except for ROLE type * feat(services/apikey): filter keys by user permissions in getAllApiKeys * feat(services/apikey): limit API key permissions to user permissions during creation/update * fix(database.util.ts): replace non-null assertion with explicit error handling * feat(services/apikey): log errors for malformed API key permissions * refactor(services/apikey): extract permission validation * feat(permission): enhance permission filtering based on user features and platform type * chore(migrations): lower API key permission value * Update packages/ui/src/views/apikey/APIKeyDialog.jsx Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update packages/ui/src/views/apikey/APIKeyDialog.jsx Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * refactor: remove deprecated APIKEY_PATH and APIKEY migration * refactor(apikey): remove functionality related to import apikey * feat(permission): filter out workspace and admin categories for non-ROLE * feat(services/apikey): validate API key permissions during create and update * chore(migrations): clean up role permissions values * fix(migrations): handle corrupted permissions gracefully * fix(server/src/index.ts): add error handling for API key permissions parsing * fix(APIKeyDialog.jsx): handle corrupted permissions when editing API key * fix(views/apikey/index.jsx): handle corrupted permissions in API key list * fix(services/apikey): validate permissions JSON in API key operations * Potential fix for code scanning alert no. 83: Clear-text logging of sensitive information Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * feat(migrations): change ApiKey.permissions column from TEXT to JSON * Update packages/server/src/services/apikey/index.ts Co-authored-by: Jocelyn Lin <[email protected]> * feat(PricingDialog.jsx): handle downgrade with excessive apikey permissions * feat(controllers\apikey): enforce permissions validation * chore(services/apikey): remove redundant null checks * fix(services/dataset): throw error when dataset not found before fetching rows --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: Jocelyn Lin <[email protected]>
Flowise Worker
By utilizing worker instances when operating in queue mode, Flowise can be scaled horizontally by adding more workers to handle increased workloads or scaled down by removing workers when demand decreases.
Here’s an overview of the process:
- The primary Flowise instance sends an execution ID to a message broker, Redis, which maintains a queue of pending executions, allowing the next available worker to process them.
- A worker from the pool retrieves a message from Redis. The worker starts execute the actual job.
- Once the execution is completed, the worker alerts the main instance that the execution is finished.
How to use
Setting up Main Server:
- Follow setup guide
- In the
.env.example, setup all the necessary env variables forQUEUE CONFIGURATION
Setting up Worker:
- Navigate to
docker/workerfolder - In the
.env.example, setup all the necessary env variables forQUEUE CONFIGURATION. Env variables for worker must match the one for main server. Change theWORKER_PORTto other available port numbers to listen for healthcheck. Ex: 5566 docker compose up -d- You can bring the worker container down by
docker compose stop
Entrypoint:
Different from main server image which is using flowise start, entrypoint for worker is pnpm run start-worker. This is because the worker's Dockerfile build the image from source files via pnpm build instead of npm registry via RUN npm install -g flowise.