Skip to content

Commit

Permalink
Merge pull request #4627 from activepieces/feat/zerobounce
Browse files Browse the repository at this point in the history
fix: queue response
  • Loading branch information
abuaboud committed May 4, 2024
2 parents 957ecdf + ae3be4f commit 7746542
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/pieces/community/queue/package.json
@@ -1,4 +1,4 @@
{
"name": "@activepieces/piece-queue",
"version": "0.0.3"
"version": "0.0.4"
}
Expand Up @@ -25,9 +25,15 @@ export const clearQueue = createAction({
async run(context) {
const queueName = constructQueueName(context.propsValue.queueName, false)
await context.store.delete(queueName, StoreScope.PROJECT)
return {
success: true
}
},
async test(context) {
const queueName = constructQueueName(context.propsValue.queueName, true)
await context.store.delete(queueName, StoreScope.PROJECT)
return {
success: true
}
}
});
Expand Up @@ -39,5 +39,5 @@ async function push({ store, queueName, items, testing }: { store: Store, queueN
const key = constructQueueName(queueName, testing)
const existingQueueItems = await store.get<unknown[]>(key, StoreScope.PROJECT) || []
const updatedQueueItems = [...existingQueueItems, ...items]
await store.put(key, updatedQueueItems, StoreScope.PROJECT)
return await store.put(key, updatedQueueItems, StoreScope.PROJECT)
}

0 comments on commit 7746542

Please sign in to comment.