Skip to content

Instantly share code, notes, and snippets.

View anishd19's full-sized avatar
🕶️
Future belongs to those who dream!

Anish Dhamodaran anishd19

🕶️
Future belongs to those who dream!
View GitHub Profile
@anishd19
anishd19 / index.ts
Created July 6, 2021 08:12 — forked from hiroppy/index.ts
polling using redux-saga
import { delay } from 'redux-saga';
import { put, take, race, call, cancel, takeEvery } from 'redux-saga/effects';
import { Upload, addJob, removeJob } from '../actions/job';
function* upload(action: Upload) {
try {
const { file, jobId: id } = action.payload;
yield put(addJob({ id }));
function runProcessLoop() {
let succeeded = false;
const sleep = function sleep(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
};
const computeIsSearchInfotextVisible = function () {
const selector =
"#main-content > app-appointment-table > ion-content > div > div > ion-grid > ion-row > ion-grid > ion-row > ion-col > ion-grid > ion-row > ion-col:nth-child(2) > form > ion-grid > ion-row:nth-child(2) > ion-col.search-dose-txt.ng-star-inserted.md.hydrated";