Pinolero
Pinolero
DDeno
Created by Pinolero on 12/3/2023 in #help
Is there a way to reset/flush my deno vk queues on deploy?
I appreciate the support 🙏
22 replies
DDeno
Created by Pinolero on 12/3/2023 in #help
Is there a way to reset/flush my deno vk queues on deploy?
But no shit... I swear I had my listenQueue in another file, NOT being imported at all. It was working.... on local and deploy.
22 replies
DDeno
Created by Pinolero on 12/3/2023 in #help
Is there a way to reset/flush my deno vk queues on deploy?
hello, thanks, that seemed to do the trick! thanks a lot I appreciate it.
22 replies
DDeno
Created by Pinolero on 12/3/2023 in #help
Is there a way to reset/flush my deno vk queues on deploy?
okay, i'll try that
22 replies
DDeno
Created by Pinolero on 12/3/2023 in #help
Is there a way to reset/flush my deno vk queues on deploy?
thas crazy though .. its been like this for 3 days. It was never imported anywhere and it was running!
22 replies
DDeno
Created by Pinolero on 12/3/2023 in #help
Is there a way to reset/flush my deno vk queues on deploy?
no it isn't
22 replies
DDeno
Created by Pinolero on 12/3/2023 in #help
Is there a way to reset/flush my deno vk queues on deploy?
And btw, I am not sending mail from deno deploy. It's just pointing to an aws endpoint that connects to my business exchange account.
22 replies
DDeno
Created by Pinolero on 12/3/2023 in #help
Is there a way to reset/flush my deno vk queues on deploy?
I'm only using kv for the queues, so there are no other writes anywhere.
22 replies
DDeno
Created by Pinolero on 12/3/2023 in #help
Is there a way to reset/flush my deno vk queues on deploy?
in deno deploy, in the analytics section - it does show as writes occuring. I just don't know why it isn't running. My delay is only 100ms
22 replies
DDeno
Created by Pinolero on 12/3/2023 in #help
Is there a way to reset/flush my deno vk queues on deploy?
running this using deno fresh
22 replies
DDeno
Created by Pinolero on 12/3/2023 in #help
Is there a way to reset/flush my deno vk queues on deploy?
//routes/api/emailer
const QueueAccountForEmailing = async (items: any, emailType: string) => {
const rowIds = items;
//console.log(`queuing row ids: ${rowIds}`);
console.log(`size of rowIds: ${rowIds.length}`);
for (const id of rowIds) {
await kv.enqueue(
{ type: "emailer", id: id, emailType }, { delay: 100 }
);
}
}


export const handler = {
async POST(_req:any) {
const payload = (await _req.json());
await QueueAccountForEmailing(payload.items, payload.emailType);
return new Response();
}
};

//queues.ts
import { kv } from "./kv.ts";
import { ExecuteWebhook } from "../routes/api/renewalupdate.ts";
import { CheckifEmailSentAndSendMail } from "../routes/api/emailer.ts";
import { GetAccountScrape } from "../routes/api/scraper.ts";

kv.listenQueue(async (msg: any) => {
if (msg.type === "emailer") {
await CheckifEmailSentAndSendMail(msg.id, msg.emailType);
}
if (msg.type === "scraper") {
await GetAccountScrape(msg.id);
}
if (msg.type === "update") {
await ExecuteWebhook(msg.id);
}
});
//routes/api/emailer
const QueueAccountForEmailing = async (items: any, emailType: string) => {
const rowIds = items;
//console.log(`queuing row ids: ${rowIds}`);
console.log(`size of rowIds: ${rowIds.length}`);
for (const id of rowIds) {
await kv.enqueue(
{ type: "emailer", id: id, emailType }, { delay: 100 }
);
}
}


export const handler = {
async POST(_req:any) {
const payload = (await _req.json());
await QueueAccountForEmailing(payload.items, payload.emailType);
return new Response();
}
};

//queues.ts
import { kv } from "./kv.ts";
import { ExecuteWebhook } from "../routes/api/renewalupdate.ts";
import { CheckifEmailSentAndSendMail } from "../routes/api/emailer.ts";
import { GetAccountScrape } from "../routes/api/scraper.ts";

kv.listenQueue(async (msg: any) => {
if (msg.type === "emailer") {
await CheckifEmailSentAndSendMail(msg.id, msg.emailType);
}
if (msg.type === "scraper") {
await GetAccountScrape(msg.id);
}
if (msg.type === "update") {
await ExecuteWebhook(msg.id);
}
});
22 replies
DDeno
Created by Pinolero on 12/3/2023 in #help
Is there a way to reset/flush my deno vk queues on deploy?
Note, I was working around in my local environment - testing queues and such. Eventually in my local environment, it stopped working. (simply delaying messages to log to console). Then I made some adjustments, deployed to deno deploy - and started testing out my queues in live environment. Now, it stopped working. I'm not sure if my local changes kv queues changes deployed to deno deploy and got it stuck?
22 replies
DDeno
Created by Pinolero on 12/3/2023 in #help
Is there a way to reset/flush my deno vk queues on deploy?
I've enqueue items, but with a delay of 100ms - but the items don't seem to execute. Not even console logging the error if any.
22 replies
DDeno
Created by Pinolero on 12/3/2023 in #help
Is there a way to reset/flush my deno vk queues on deploy?
kv.listenQueue(async (msg: any) => {} ); like so? i'll give it a try
22 replies
DDeno
Created by Pinolero on 12/2/2023 in #help
Pricing Question - Is my pro account applied to my Orgs?
Or purchase a pro account .. specifically for that org?
3 replies
DDeno
Created by Pinolero on 9/19/2023 in #help
Error Deploying to Deno Deploy LODASH isEmpty.js
thanks a billion!!!! I really appreciate your quick help!
5 replies
DDeno
Created by Pinolero on 9/19/2023 in #help
Error Deploying to Deno Deploy LODASH isEmpty.js
Thanks for the quick response. Yes I believe one of my libraries was using it. (I actually don’t know which one, to be honest.) Can you point me to using import map?
5 replies