Paul Shriner - Titleless
Paul Shriner - Titleless
CDCloudflare Developers
Created by Paul Shriner - Titleless on 12/9/2024 in #workers-help
Durable Objects appear to be dropping elements in array
I have a queue that grabs 100 contacts per call and then loops back on itself until all of the contacts are gotten. I am using itty-durable if that matters. The problem is: When the array hits rougly 1000 entries, it starts dropping values. There are no other paths accessing this DO, and the only method that access the array is this one:
async addSends(items){
//this.sends.push(...items);
items.forEach(element => {
this.sends.push(element)
});

return this.getCounts();
}
async addSends(items){
//this.sends.push(...items);
items.forEach(element => {
this.sends.push(element)
});

return this.getCounts();
}
Very simple call. Any ideas? The class is being extended from createDurable
export class Sender extends createDurable({ autoReturn: true, autoPersist: true }) {
export class Sender extends createDurable({ autoReturn: true, autoPersist: true }) {
And because it is being isntantiated from a queue, I am using ProxyDurable:
this.sendDO = proxyDurable(env.SENDS, doParams)
this.sendDO = proxyDurable(env.SENDS, doParams)
1 replies
CDCloudflare Developers
Created by Paul Shriner - Titleless on 2/16/2024 in #workers-help
Set cookie for worker, access by worker not working.
I have been spinning my wheels for a couple of days on this. I don't believe that this is the same CORS request that a bunch folks have asked. All of my CORS values are set.
const corsHeaders = {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET,HEAD,POST,OPTIONS",
"Access-Control-Max-Age": "86400",
"Access-Control-Allow-Credentials": true,
};
const corsHeaders = {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET,HEAD,POST,OPTIONS",
"Access-Control-Max-Age": "86400",
"Access-Control-Allow-Credentials": true,
};
I am hosting my UI on a different domain. For now, it is a localhost domain. I am access my worker by way of API. I am returning a Set-Cookie value on the response of the API call. I can see that value in the developer tools of Chrome. However when I got to make a get request on the same worker, the cookie is gone. I checked the application tab of developer tools for the cookie, no luck. Basically the need is this. I want to assign a reward to you for calling the URL, and if I don't know who you are, I want you to register. How do I crack this nut?
3 replies