Add API timeout / Fix .NET 6 conversion (#32)
* API requests to Mastodon instances now time out after 30 seconds (inspired by #29) * Projects now target .NET 6 (#31) * Minor repo reorg to support single-file deployment (#31)
This commit was merged in pull request #32.
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"name": "jobs-jobs-jobs",
|
||||
"version": "2.2.0",
|
||||
"version": "2.2.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint",
|
||||
"apiserve": "vue-cli-service build && cd ../Api && dotnet run -c Debug",
|
||||
"publish": "vue-cli-service build --modern && cd ../Api && dotnet publish -c Release -r linux-x64 --self-contained false"
|
||||
"apiserve": "vue-cli-service build && cd ../Server && dotnet run -c Debug",
|
||||
"publish": "vue-cli-service build --modern && cd ../Server && dotnet publish -c Release -r linux-x64 -p:PublishSingleFile=true --self-contained false"
|
||||
},
|
||||
"dependencies": {
|
||||
"@mdi/js": "^5.9.55",
|
||||
|
||||
@@ -2,7 +2,7 @@ module.exports = {
|
||||
transpileDependencies: [
|
||||
'vuetify'
|
||||
],
|
||||
outputDir: '../Api/wwwroot',
|
||||
outputDir: '../Server/wwwroot',
|
||||
configureWebpack: {
|
||||
module: {
|
||||
rules: [{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<WarnOn>3390;$(WarnOn)</WarnOn>
|
||||
</PropertyGroup>
|
||||
@@ -29,7 +29,10 @@ open System.Text.Json
|
||||
open JobsJobsJobs.Domain.SharedTypes
|
||||
|
||||
/// HTTP client to use to communication with Mastodon
|
||||
let private http = new HttpClient()
|
||||
let private http =
|
||||
let h = new HttpClient ()
|
||||
h.Timeout <- TimeSpan.FromSeconds 30.
|
||||
h
|
||||
|
||||
/// Verify the authorization code with Mastodon and get the user's profile
|
||||
let verifyWithMastodon (authCode : string) (inst : MastodonInstance) rtnHost (log : ILogger) = task {
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<WarnOn>3390;$(WarnOn)</WarnOn>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Domain\Domain.fsproj" />
|
||||
<ProjectReference Include="..\Domain\JobsJobsJobs.Domain.fsproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
Reference in New Issue
Block a user