All Projects → face-it → Hangfire.tags

face-it / Hangfire.tags

Licence: mit
Add tags to Hangfire backgroundjobs

Projects that are alternatives of or similar to Hangfire.tags

Hypertag
Knowledge Management for Humans using Machine Learning & Tags
Stars: ✭ 116 (+176.19%)
Mutual labels:  search, tagging, tags
SSCTaglistView
Customizable iOS tag list view, in Swift.
Stars: ✭ 54 (+28.57%)
Mutual labels:  tags, tagging
tagify
Tagify produces a set of tags from a given source. Source can be either an HTML page, a Markdown document or a plain text. Supports English, Russian, Chinese, Hindi, Spanish, Arabic, Japanese, German, Hebrew, French and Korean languages.
Stars: ✭ 24 (-42.86%)
Mutual labels:  tags, tagging
additional tags
Redmine Plugin for adding tags functionality to issues and wiki pages.
Stars: ✭ 25 (-40.48%)
Mutual labels:  tags, tagging
React Native Tag Input
A simple React Native component that creates an input for tags, emails, etc.
Stars: ✭ 217 (+416.67%)
Mutual labels:  tagging, tags
Tagsistant
Semantic filesystem for Linux, with relation reasoner, autotagging plugins and a deduplication service
Stars: ✭ 244 (+480.95%)
Mutual labels:  tagging, tags
preact-token-input
🔖 A text field that tokenizes input, for things like tags.
Stars: ✭ 57 (+35.71%)
Mutual labels:  tags, tagging
tag-picker
Better tags input interaction with JavaScript.
Stars: ✭ 27 (-35.71%)
Mutual labels:  tags, tagging
tagflow
TagFlow is a file manager working with tags.
Stars: ✭ 22 (-47.62%)
Mutual labels:  tags, tagging
guess-filename.py
Derive a file name according to old file name cues and/or PDF file content
Stars: ✭ 27 (-35.71%)
Mutual labels:  tags, tagging
Terratag
Terratag is a CLI tool that enables users of Terraform to automatically create and maintain tags across their entire set of AWS, Azure, and GCP resources
Stars: ✭ 385 (+816.67%)
Mutual labels:  tagging, tags
Supertag
A tag-based filesystem
Stars: ✭ 207 (+392.86%)
Mutual labels:  tagging, tags
Tagify
🔖 lightweight, efficient Tags input component in Vanilla JS / React / Angular / Vue
Stars: ✭ 2,305 (+5388.1%)
Mutual labels:  tagging, tags
Taggle.js
📝 Form-ready dependency-less tagging.
Stars: ✭ 644 (+1433.33%)
Mutual labels:  tagging, tags
Redoflacs
Parallel BASH commandline FLAC compressor, verifier, organizer, analyzer, and retagger
Stars: ✭ 71 (+69.05%)
Mutual labels:  tagging, tags
Id3
Library to read, modify and write ID3 & Lyrics3 tags in MP3 files. Provides an extensible framework for retrieving ID3 information from online services.
Stars: ✭ 27 (-35.71%)
Mutual labels:  tags, tagging
React Grid Gallery
Justified image gallery component for React
Stars: ✭ 571 (+1259.52%)
Mutual labels:  tagging, tags
React Input Tags
React component for tagging inputs.
Stars: ✭ 10 (-76.19%)
Mutual labels:  tagging, tags
Pelias Android Sdk
Android sdk for pelias
Stars: ✭ 20 (-52.38%)
Mutual labels:  search
Manticoresearch Php
Official PHP client for Manticore Search
Stars: ✭ 33 (-21.43%)
Mutual labels:  search

Hangfire.Tags

Build status NuGet MIT License Donate

Inspired by the lack of searching and grouping, Hangfire.Tags provides a way to search and group different jobs.

sidemenu dashboard

Contributers

  • Yong Liu: Special thanks for all the pull requests you've created. Thank you so much!
  • Adam Taylor: MySql support

Features

  • 100% Safe: no Hangfire-managed data is ever updated, hence there's no risk to corrupt it.
  • Attributes: supports [Tag("{0}")] syntax for creating a default set of tags when creating a job.
  • Extensions: has extension methods on PerformContext, but also on string (for instance for adding tags to a jobid).
  • Clean up: uses Hangfire sets, which are cleaned when jobs are removed.
  • Filtering: allows filtering of tags based on tags and states, this makes it easy to requeue failed jobs with a certain tag.
  • Searching: allows you to search for tags
  • Storages: has an storage for SQL Server, MySql, PostgreSql and initial Redis support

Setup

In .NET Core's Startup.cs:

public void ConfigureServices(IServiceCollection services)
{
    services.AddHangfire(config =>
    {
        config.UseSqlServerStorage("connectionSting");
        // config.UseTagsWithPostgreSql();
        // config.UseTagsWithMySql();
        // config.UseTagsWithRedis();
        config.UseTagsWithSql();
    });
}

Otherwise,

GlobalConfiguration.Configuration
    .UseSqlServerStorage("connectionSting")
    //.UseTagsWithPostgreSql()
    //.UseTagsWithMySql()
    //.UseTagsWithRedis();
    .UseTagsWithSql();

NOTE: If you have Dashboard and Server running separately, you'll need to call UseTags(), UseTagsWithSql(), UseTagsWithPostgreSql(), UseTagsWithMySql() or UseTagsWithRedis() on both.

Additional options

As usual, you may provide additional options for UseTags() method.

Here's what you can configure:

  • BackgroundColor - default background color for the tags
  • TextColor - default text color of the tags
  • Tags interface - you can specify an autocomplete tags search (Yong Liu).

NOTE: After you initially add Hangfire.Tags (or change the options above) you may need to clear browser cache, as generated CSS/JS can be cached by browser.

Providers

In order to properly cleanup tags for expired jobs, an extension is required for the default storage providers. Right now, there are three providers: for SQL server, for PostgreSQL and for MySql.

Tags

Hangfire.Tags provides extension methods on PerformContext object, hence you'll need to add it as a job argument.

NOTE: Like IJobCancellationToken, PerformContext is a special argument type which Hangfire will substitute automatically. You should pass null when enqueuing a job.

Now you can add a tag:

public void TaskMethod(PerformContext context)
{
    context.AddTag("Hello, world!");
}

which results in the tag hello-world.

You can also add tags using attributes, either on the class, or on the method (or both!)

[Tag("TaskMethod")]
public void TaskMethod(PerformContext context)
{
    ....
}

Search tags

In the Dashboard, when clicking on Jobs, you'll see a new menu item, called Tags. By default this page will show you all defined tags in the system. Clicking on a tag will show a list of all jobs with that tag attached.

The default view for showing the tags is a so called tagcloud. If you prefer an autocomplete dropdown list, you can specify that using the options:

var options = new TagsOptions()
{
   TagsListStyle = TagsListStyle.Dropdown
};
config.UseTagsWithSql(options);

The result will look like this: tagsearch

License

Copyright (c) 2018 2Face-IT B.V.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].