summaryrefslogtreecommitdiffstats
path: root/src/tasks.ts
blob: 18b6fe8e50d7c88190edbc6d4bf5cf9b81863579 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { InstagramTask } from "./instagram_task";

// union of possible task types
export type Task = InstagramTask;

const taskQueue: Task[] = [];

export const addTask = (task: Task) => {
  taskQueue.push(task);
};

export const getTask = (): Task | undefined => {
  return taskQueue.shift();
};