blob: 388dde8354cb6620638acfa1bd0e7f2867228139 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
export interface InstagramTask {
type: "download_instagram";
url: string;
replyId: string;
}
export interface SlackReplyTask {
type: "slack_reply";
replyId: string;
message: string;
filePath: string;
}
export type Task = InstagramTask | SlackReplyTask;
const taskQueue: Task[] = [];
export const addTask = (task: Task) => {
taskQueue.push(task);
};
export const getTask = (): Task | undefined => {
return taskQueue.shift();
};
|