Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
absorbb committed Jan 26, 2024
1 parent c189b0f commit e2481cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions services/rotor/src/lib/entity-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const refreshFunc =
headers["If-Modified-Since"] = ifModifiedSince.toUTCString();
}
try {
const res = await fetch(`${repositoryBase}/${storeId}?timeoutMs=10000&listen=1`, {
const res = await fetch(`${repositoryBase}/${storeId}`, {
method: "GET",
headers: headers,
agent: await (repositoryBase.startsWith("https://") ? httpsAgent : httpAgent).waitInit(),
Expand All @@ -58,11 +58,6 @@ const refreshFunc =
if (lmString) {
lastModified = new Date(lmString);
}
//print all headers
res.headers.forEach((value, name) => {
log.atInfo().log(`${storeId} header: ${name}: ${value}`);
});
log.atInfo().log(`${storeId} lm: (${lmString}/${res.headers.get("last-modified")})`);
log.atInfo().log(`${storeId} updated: ${lastModified} previous update date: ${ifModifiedSince}`);
return {
store: {
Expand Down
2 changes: 1 addition & 1 deletion webapps/console/pages/api/admin/export/[name]/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ export default createRoute()
if (query.listen) {
//fake implementation of long polling, switch to pg NOTIFY later
await new Promise(resolve => setTimeout(resolve, query.timeoutMs));
lastModified = await exp.lastModified();
lastModified = (await exp.lastModified()) || safeLastModified;
if (notModified(ifModifiedSince, lastModified)) {
res.writeHead(304, { "Last-Modified": lastModified.toUTCString() });
res.end();
Expand Down

0 comments on commit e2481cc

Please sign in to comment.