diff --git a/CHANGELOG.md b/CHANGELOG.md index 604e7219d8c18a83d23bbe56b422d4ac5ddc8bc8..0f4b5b47d09116157bb30ee904f4c8dd6ba0a8bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ * Fixed pseudocode not rendering properly due to element `p` overflow setting. * Added the ability for the `git-heatmap` to combine activity from multiple sources. +* Fixed `DEADLINE_EXCEEDED` error which occasionally occured when calling + sendNote. ## 2.1.0 diff --git a/README.md b/README.md index dc150cb8a90c709ebdddabeff72357b668a8ce08..7623624c3fe5bc9079a4244d5c43e76a53c82fb9 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ important you dont loose these as they identify your site. So save them. ```bash npm install ts-node typescript '@types/node' -./node_modules/.bin/ts-node --esm generateKeys.mts +node --loader ts-node/esm generateKeys.mts ``` We will use these keys to set the values in the next step. diff --git a/api/activitypub/sendNote.ts b/api/activitypub/sendNote.ts index 0315a3207cd4dbc8f0869964d9a40517aa3b970c..2b94ab10f0bf04c7b3c313271d1b2bbe61a0f399 100644 --- a/api/activitypub/sendNote.ts +++ b/api/activitypub/sendNote.ts @@ -5,6 +5,8 @@ import { OrderedCollection } from 'activitypub-core-types/lib/activitypub/index. import { sendSignedRequest } from '../../lib/activitypub/utils/sendSignedRequest.js'; import { fetchActorInformation } from '../../lib/activitypub/utils/fetchActorInformation.js'; +export const maxDuration = 300; // This function can run for a maximum of 5 minutes + process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; if (!admin.default.apps.length) { @@ -40,7 +42,7 @@ export default async function (req: VercelRequest, res: VercelResponse) { let sentIds = []; if ( (!config.exists) || (configData == undefined) ) { // Config doesn't exist, make something - configRef.set({ + await configRef.set({ "sentIds": [], "lastEpoch": "" }); @@ -57,7 +59,7 @@ export default async function (req: VercelRequest, res: VercelResponse) { res.status(401).end("Function is rate limited, please wait") return; } else { - configRef.set({ + await configRef.set({ "sentIds": sentIds, "lastEpoch": new Date().getTime() }); @@ -117,7 +119,7 @@ export default async function (req: VercelRequest, res: VercelResponse) { if( sendingIds.size > 0 ) { newSentIds.push(...sendingIds); } - configRef.set({ + await configRef.set({ "sentIds": newSentIds, "lastEpoch": new Date().getTime() }); diff --git a/hugo.toml.example b/hugo.toml.example index 2d66a54448b40577556755e822cb92ecb5cf5434..9c4d1da5d9714dec283c9d27ac8d612a3e0b1f01 100644 --- a/hugo.toml.example +++ b/hugo.toml.example @@ -1,10 +1,7 @@ -baseurl = "https://flear.org/" +# The base url of the website. This should be all lowercase and end with a forward slash. +baseurl = "https://fedipage.com/" languageCode = "en-us" -<<<<<<< HEAD -title = "Free and Libre Engineers for Amateur Radio" -======= title = "Hugo based static page generator and blog with ActivityPub support" ->>>>>>> upstream paginate = 20 pygmentsCodeFences = true @@ -15,20 +12,14 @@ defaultContentLanguageInSubdir = false # Author displayed on posts, the current template doesnt actually render this [author] -name = "FLEAR" -email = "flear@flear.org" +name = "Fedipage" +email = "fedipage@fedipage.com" # Custom site variables used when rendering the template [params] -siteName="FLEAR" -siteTagLine="Free & Libre Engineers for Amateur Radio" +siteName="Fedipage" +siteTagLine="An ActivityPub supporting static page generator." # Do not include the @ -<<<<<<< HEAD -twitterUser="FLEAR_radio" -siteDescription="FLEAR is an open-source and open-standards incubator for Ham Radio" -# this is the user name of the ActivityPub account. It will be the first part of your handle as @apUSer@domain -apUser="FLEAR" -======= twitterUser="fedipage" siteDescription="Fedipage is a Hugo based static page generator and blog with ActivityPub support" # this is the user name of the ActivityPub account. It will be the first part of @@ -38,13 +29,18 @@ siteDescription="Fedipage is a Hugo based static page generator and blog with Ac apUser="Fedipage" # This is where you run an alternative mastodon based account. This will be # setup to be an alias for this account. ->>>>>>> upstream secondaryApHost="https://qoto.org" +# This shouldnt include the @ secondaryApUser="FLEAR" -repoUrl="https://git.qoto.org/flear" -siteRepoUrl="https://git.qoto.org/flear/flear-site" -siteEmail="flear@flear.org" -postHashtags=["HamRadio", "AmateurRadio", "Ham", "RF", "ElectricalEngineering", "EE"] +# The repo use for the repo url button in the navigation menu and other places. +# This can be any git repor that contains your project code, not the code for +# this website usually but it can be. +repoUrl="https://git.qoto.org/fedipage/fedipage" +# The url to where the source code for this website will be. +siteRepoUrl="https://git.qoto.org/fedipage/fedipage" +# The email of the site's webmaster or whoever will receive comms +siteEmail="the@jeffreyfreeman.me" +postHashtags=["Fediverse", "ActivityPub", "MastoAdmin"] renderDefaultHashtags=true renderArticleHashtags=true gitlabHeatmapData=["https://corsproxy.io?https://gitlab.com/users/freemo/calendar.json", "https://git.qoto.org/users/freemo/calendar.json"]