feat(server): add RSS feed fetching functionality and enhance workflow management
- Introduced a new script for fetching RSS feeds, allowing workflows to process and transform feed data using JSONata. - Updated workflow configuration to include a new RSS feed script, enhancing the capabilities of existing workflows. - Enhanced the workflow management API to support enabling and disabling workflows dynamically. - Improved UI components to reflect the new workflow features, including enabling/disabling workflows and displaying their statuses. - Added support for wildcard filtering in workflow queries, improving the flexibility of workflow management.
This commit is contained in:
@@ -175,6 +175,10 @@ export function createRegistry(server) {
|
||||
method,
|
||||
url,
|
||||
handler: async (req, reply) => {
|
||||
const entry = workflows.get(key);
|
||||
if (!entry || entry.workflow?.enabled === false) {
|
||||
return reply.code(404).send({ error: "workflow disabled" });
|
||||
}
|
||||
const result = await runWorkflow(
|
||||
key,
|
||||
{ data: req.body },
|
||||
@@ -434,6 +438,10 @@ export function createRegistry(server) {
|
||||
}
|
||||
|
||||
const { owner, workflow } = entry;
|
||||
if (workflow?.enabled === false && trigger.type !== "manual") {
|
||||
log.debug({ workflow: key, trigger }, "skipping disabled workflow");
|
||||
return { runId: null, status: "failed", error: "workflow disabled" };
|
||||
}
|
||||
const run = await store.startRun({
|
||||
owner,
|
||||
workflow: key,
|
||||
|
||||
Reference in New Issue
Block a user