Skip to content

Commit b8614c0

Browse files
committed
fixup! Implement Push Publisher
1 parent 97e8c80 commit b8614c0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/publishers/push.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ const RETRY_LIMIT = 5
4646
*/
4747
export const runPushPublisher = async (): Promise<number> => {
4848
for await (const doc of viewToStream(async params =>
49-
dbTasks.view('tasks_publishing', 'tasks_publishing', params)
49+
Promise.resolve(
50+
dbTasks.view('tasks_publishing', 'tasks_publishing', params)
51+
)
5052
)) {
5153
const clean: TaskDoc = asTaskDoc(doc)
5254
const currentTask = clean.doc
@@ -81,6 +83,7 @@ export const runPushPublisher = async (): Promise<number> => {
8183
const canExecute = (task: Task): boolean => {
8284
return (
8385
task.action.inProgress == null &&
86+
task.action.type === 'push' &&
8487
task.action.repeat == null &&
8588
task.action.inProgress === false
8689
)

0 commit comments

Comments
 (0)