10 Commits

Author SHA1 Message Date
Austin Winstanley f19f1c17b3 upgraded to netstandard2.0 2017-09-27 16:21:55 -05:00
Austin Winstanley d9cd7a63f7 fix for CI 2017-09-12 22:34:33 -05:00
Austin Winstanley 8e54a30a70 updated to .Net Standard / Core 2.0.0 2017-09-12 22:30:11 -05:00
Austin Winstanley 690e97e0e5 Fixed Appveyor CI badge 2017-07-18 03:17:51 -05:00
Austin Winstanley 59e2bcf293 Fixed AppVeyor build badge 2017-07-18 03:05:15 -05:00
Austin Winstanley 15bfa38032 fixed Travis CI link 2 2017-07-18 02:57:56 -05:00
Austin Winstanley 62ec953b07 Fixed TravisCI build link 2017-07-18 02:56:58 -05:00
Austin Winstanley c8cad4c8b2 Merge pull request #23 from Fewzion/master
Fix bug with getting a stale JobQueues query result that resulted in the
2017-07-18 02:18:31 -05:00
Joerg Kiegeland 64f4927e1b Fix bug with getting a stale JobQueues query result that resulted in the
same job being executed multiple times by different worker threads (e.g.
consider a Hangfire job then sending out the same email multiple times).
2017-07-08 22:29:45 +10:00
Austin Winstanley b0c3b5e2ed added AppVeyor CI for Windows builds 2017-04-28 17:48:50 -05:00
9 changed files with 108 additions and 68 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
language: csharp
solution: Hangfire.Raven.sln
mono: none
dotnet: 1.0.1
dotnet: 2.0.0
dist: trusty
sudo: required
script:
+16 -13
View File
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26403.7
VisualStudioVersion = 15.0.26923.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_", "_", "{8CF2D2F6-BEFE-47FE-B141-0017FC6F97D8}"
ProjectSection(SolutionItems) = preProject
@@ -16,9 +16,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hangfire.Raven", "src\Hangf
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{F42EDD6E-883B-4067-94AD-72EC7A095BF2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hangfire.Raven.Samples.Console", "samples\Hangfire.Raven.Samples.Console\Hangfire.Raven.Samples.Console.csproj", "{F8880C71-C748-46DF-8F93-39859A73AAF8}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hangfire.Raven.Samples.AspNetCore", "samples\Hangfire.Raven.Samples.AspNetCore\Hangfire.Raven.Samples.AspNetCore.csproj", "{34B7ED1A-796C-40B8-A8B9-D12D88C8A880}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hangfire.Raven.Samples.AspNetCore", "samples\Hangfire.Raven.Samples.AspNetCore\Hangfire.Raven.Samples.AspNetCore.csproj", "{87E1FD42-C6CC-4F82-8B29-012636B5762F}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hangfire.Raven.Samples.Console", "samples\Hangfire.Raven.Samples.Console\Hangfire.Raven.Samples.Console.csproj", "{A7691484-4466-4F8C-9B57-C77EA0FF4670}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -30,21 +30,24 @@ Global
{BA18F6BF-5613-4B9D-A57A-C05C51148EC5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BA18F6BF-5613-4B9D-A57A-C05C51148EC5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BA18F6BF-5613-4B9D-A57A-C05C51148EC5}.Release|Any CPU.Build.0 = Release|Any CPU
{F8880C71-C748-46DF-8F93-39859A73AAF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F8880C71-C748-46DF-8F93-39859A73AAF8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F8880C71-C748-46DF-8F93-39859A73AAF8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F8880C71-C748-46DF-8F93-39859A73AAF8}.Release|Any CPU.Build.0 = Release|Any CPU
{87E1FD42-C6CC-4F82-8B29-012636B5762F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{87E1FD42-C6CC-4F82-8B29-012636B5762F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{87E1FD42-C6CC-4F82-8B29-012636B5762F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{87E1FD42-C6CC-4F82-8B29-012636B5762F}.Release|Any CPU.Build.0 = Release|Any CPU
{34B7ED1A-796C-40B8-A8B9-D12D88C8A880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{34B7ED1A-796C-40B8-A8B9-D12D88C8A880}.Debug|Any CPU.Build.0 = Debug|Any CPU
{34B7ED1A-796C-40B8-A8B9-D12D88C8A880}.Release|Any CPU.ActiveCfg = Release|Any CPU
{34B7ED1A-796C-40B8-A8B9-D12D88C8A880}.Release|Any CPU.Build.0 = Release|Any CPU
{A7691484-4466-4F8C-9B57-C77EA0FF4670}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A7691484-4466-4F8C-9B57-C77EA0FF4670}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A7691484-4466-4F8C-9B57-C77EA0FF4670}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A7691484-4466-4F8C-9B57-C77EA0FF4670}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{BA18F6BF-5613-4B9D-A57A-C05C51148EC5} = {EF9BFE2C-0386-4EC4-83EC-D7E315F56735}
{F8880C71-C748-46DF-8F93-39859A73AAF8} = {F42EDD6E-883B-4067-94AD-72EC7A095BF2}
{87E1FD42-C6CC-4F82-8B29-012636B5762F} = {F42EDD6E-883B-4067-94AD-72EC7A095BF2}
{34B7ED1A-796C-40B8-A8B9-D12D88C8A880} = {F42EDD6E-883B-4067-94AD-72EC7A095BF2}
{A7691484-4466-4F8C-9B57-C77EA0FF4670} = {F42EDD6E-883B-4067-94AD-72EC7A095BF2}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1E710484-845C-4FAB-9F3F-2E3384385445}
EndGlobalSection
EndGlobal
+12 -8
View File
@@ -1,11 +1,17 @@
# Hangfire RavenDB
[![Build Status](https://travis-ci.org/RefreshingIO/hangfire-ravendb.svg?branch=master)](https://travis-ci.org/RefreshingIO/hangfire-ravendb)
## Build Status
`Platform` | `Master`
--- | ---
**Windows** | [![Build status](https://ci.appveyor.com/api/projects/status/hcmu0b0p62mbuwen?svg=true)](https://ci.appveyor.com/project/CadyIO/hangfire-ravendb)
**Linux / OS X** | [![Travis CI Build Status](https://travis-ci.org/CadyIO/hangfire-ravendb.svg?branch=master)](https://travis-ci.org/CadyIO/hangfire-ravendb)
## Overview
RavenDB job storage for Hangfire
Usage
--------
## Usage
This is how you connect to a ravendb server (local or remote)
```csharp
@@ -40,7 +46,7 @@ Recurring jobs were never been simpler, just call the following method to perfor
RecurringJob.AddOrUpdate(() => Console.WriteLine("Transparent!"), Cron.Daily);
```
**Continuations**
## Continuations
Continuations allow you to define complex workflows by chaining multiple background jobs together.
@@ -49,8 +55,7 @@ var id = BackgroundJob.Enqueue(() => Console.WriteLine("Hello, "));
BackgroundJob.ContinueWith(id, () => Console.WriteLine("world!"));
```
License
--------
## License
Copyright © 2013-2014 Sergey Odinokov.
@@ -67,7 +72,6 @@ GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see [http://www.gnu.org/licenses/](http://www.gnu.org/licenses).
Known Bugs
----------
## Known Bugs
Hangfire.Tests requires RavenDB.Client which requires .Net 4.5. Until RavenDB 4.0 is released, Hangfire.Tests cannot be included and run.
+33
View File
@@ -0,0 +1,33 @@
version: 1.0.{build}
# branches to build
branches:
# whitelist
only:
- master
- production
# blacklist
except:
- gh-pages
# build configuration
configuration:
- Debug
- Release
# build platform
platform: Any CPU
# environment variables
environment:
# Don't report back to the mothership
DOTNET_CLI_TELEMETRY_OPTOUT: 1
# scripts to run before build
before_build:
- cmd: appveyor-retry dotnet restore -v Minimal
# run dotnet cli instead of msbuild
build_script:
- dotnet build
@@ -1,33 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp1.1</TargetFramework>
<Version>3.0.0</Version>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<FileVersion>3.0.0.0</FileVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>3.1.1</Version>
<AssemblyVersion>3.1.1.0</AssemblyVersion>
<FileVersion>3.1.1.0</FileVersion>
<Description>RavenDB job storage for Hangfire - AspNetCore Example</Description>
<Authors>Refreshing Collective &lt;contact@refreshing.io&gt;</Authors>
<Company>Refreshing Collective LLC</Company>
<Copyright>Copyright @ Refreshing Collective LLC</Copyright>
<Authors>CadyIO &lt;contact@cady.io&gt;</Authors>
<Company>Cady IO</Company>
<Copyright>Copyright @ Cady LLC</Copyright>
<PackageLicenseUrl>http://www.gnu.org/licenses/lgpl-3.0.html</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/RefreshingIO/hangfire-ravendb</PackageProjectUrl>
<PackageProjectUrl>https://github.com/CadyIO/hangfire-ravendb</PackageProjectUrl>
<PackageIconUrl>https://avatars2.githubusercontent.com/u/7880472?v=3&amp;s=200</PackageIconUrl>
<PackageId>Hangfire.Raven.Samples.AspNetCore</PackageId>
<PackageTags>Hangfire;AspNet;MVC;OWIN;RavenDB;Long-Running;Background;Fire-And-Forget;Delayed;Recurring;Tasks;Jobs;Scheduler;Threading;Queues</PackageTags>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/RefreshingIO/hangfire-ravendb</RepositoryUrl>
</PropertyGroup>
<PropertyGroup>
<PackageTargetFallback>$(PackageTargetFallback);portable-net45+win8+wp8+wpa81;</PackageTargetFallback>
<RepositoryUrl>https://github.com/CadyIO/hangfire-ravendb</RepositoryUrl>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Hangfire.AspNetCore" Version="1.6.12" />
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.1" />
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="1.1.0" />
<PackageReference Include="Hangfire.AspNetCore" Version="1.6.17" />
<PackageReference Include="Microsoft.AspNetCore" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="2.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="2.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="1.0.0" />
@@ -5,21 +5,21 @@
</PropertyGroup>
<PropertyGroup>
<TargetFramework>netstandard1.3</TargetFramework>
<Version>3.0.0</Version>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<FileVersion>3.0.0.0</FileVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>3.1.1</Version>
<AssemblyVersion>3.1.1.0</AssemblyVersion>
<FileVersion>3.1.1.0</FileVersion>
<Description>RavenDB job storage for Hangfire - Console Example</Description>
<Authors>Refreshing Collective &lt;contact@refreshing.io&gt;</Authors>
<Company>Refreshing Collective LLC</Company>
<Copyright>Copyright @ Refreshing Collective LLC</Copyright>
<Authors>CadyIO &lt;contact@cady.io&gt;</Authors>
<Company>Cady IO</Company>
<Copyright>Copyright @ Cady LLC</Copyright>
<PackageLicenseUrl>http://www.gnu.org/licenses/lgpl-3.0.html</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/RefreshingIO/hangfire-ravendb</PackageProjectUrl>
<PackageProjectUrl>https://github.com/CadyIO/hangfire-ravendb</PackageProjectUrl>
<PackageIconUrl>https://avatars2.githubusercontent.com/u/7880472?v=3&amp;s=200</PackageIconUrl>
<PackageId>Hangfire.Raven.Samples.Console</PackageId>
<PackageTags>Hangfire;AspNet;MVC;OWIN;RavenDB;Long-Running;Background;Fire-And-Forget;Delayed;Recurring;Tasks;Jobs;Scheduler;Threading;Queues</PackageTags>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/RefreshingIO/hangfire-ravendb</RepositoryUrl>
<RepositoryUrl>https://github.com/CadyIO/hangfire-ravendb</RepositoryUrl>
<ApplicationIcon />
<OutputTypeEx>exe</OutputTypeEx>
<StartupObject />
@@ -38,8 +38,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Hangfire.Core" Version="1.6.12" />
<PackageReference Include="RavenDB.Client" Version="3.5.4-patch-35196" />
<PackageReference Include="Hangfire.Core" Version="1.6.17" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="RavenDB.Client" Version="3.5.4" />
</ItemGroup>
</Project>
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard1.3</TargetFramework>
<Version>3.0.0</Version>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<FileVersion>3.0.0.0</FileVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>3.1.1</Version>
<AssemblyVersion>3.1.1.0</AssemblyVersion>
<FileVersion>3.1.1.0</FileVersion>
<Description>Tests for RavenDB job storage for Hangfire</Description>
<Description>A collection of .Net utilities for JSON</Description>
<Authors>Refreshing Collective &lt;contact@refreshing.io&gt;</Authors>
+13 -12
View File
@@ -1,31 +1,32 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard1.3</TargetFramework>
<Version>3.0.0</Version>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<FileVersion>3.0.0.0</FileVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>3.1.1</Version>
<AssemblyVersion>3.1.1.0</AssemblyVersion>
<FileVersion>3.1.1.0</FileVersion>
<Description>RavenDB job storage for Hangfire</Description>
<Authors>Refreshing Collective &lt;contact@refreshing.io&gt;</Authors>
<Company>Refreshing Collective LLC</Company>
<Copyright>Copyright @ Refreshing Collective LLC</Copyright>
<Authors>CadyIO &lt;contact@cady.io&gt;</Authors>
<Company>Cady IO</Company>
<Copyright>Copyright @ Cady LLC</Copyright>
<PackageLicenseUrl>http://www.gnu.org/licenses/lgpl-3.0.html</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/RefreshingIO/hangfire-ravendb</PackageProjectUrl>
<PackageProjectUrl>https://github.com/CadyIO/hangfire-ravendb</PackageProjectUrl>
<PackageIconUrl>https://avatars2.githubusercontent.com/u/7880472?v=3&amp;s=200</PackageIconUrl>
<PackageId>Hangfire.Raven</PackageId>
<PackageTags>Hangfire;AspNet;MVC;OWIN;RavenDB;Long-Running;Background;Fire-And-Forget;Delayed;Recurring;Tasks;Jobs;Scheduler;Threading;Queues</PackageTags>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/RefreshingIO/hangfire-ravendb</RepositoryUrl>
<RepositoryUrl>https://github.com/CadyIO/hangfire-ravendb</RepositoryUrl>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>bin\Debug\netstandard1.4\Hangfire.Raven.xml</DocumentationFile>
<DocumentationFile>bin\Debug\netstandard2.0\Hangfire.Raven.xml</DocumentationFile>
<GenerateSerializationAssemblies></GenerateSerializationAssemblies>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Hangfire.Core" Version="1.6.12" />
<PackageReference Include="RavenDB.Client" Version="3.5.4-patch-35196" />
<PackageReference Include="Hangfire.Core" Version="1.6.17" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="RavenDB.Client" Version="3.5.4" />
</ItemGroup>
</Project>
@@ -62,6 +62,7 @@ namespace Hangfire.Raven.JobQueues
foreach (var job in repository.Query<Hangfire_JobQueues.Mapping, Hangfire_JobQueues>()
.Where(fetchCondition)
.Where(job => job.Queue == queue)
.Customize(x => x.WaitForNonStaleResultsAsOfNow())
.OfType<JobQueue>())
{
job.FetchedAt = DateTime.UtcNow;