Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new overload method for MongoDB Storage #77

Open
benniep opened this issue Nov 18, 2020 · 3 comments
Open

Add new overload method for MongoDB Storage #77

benniep opened this issue Nov 18, 2020 · 3 comments

Comments

@benniep
Copy link

benniep commented Nov 18, 2020

Good day,

Can we please add a new overload method to the ConfigurationExtensions.cs for MongoDB storage?

public static MongoStorage UserRecurringJobAdmin(this MongoStorage mongoStorage, [NotNull] params Assembly[] assemblies)
{
if(assemblied == null) throw new ArgumenrtNullException(nameof(assemblies);

  StorageAssemblySingleton.GetInstance().SetCurrentAssembly(assemblies: assemblies);
  PeriodicJobBuilder.GetAllJobs();
  CreateManagmentJob();

 return mongoStorage;

}

I am willing to help with the code. We really want to use this extension and by adding this overload we can make it work with the MongoStorage. We cannot use SqlStorage becasue our DBAs will not allow all the commands that hangfire issue.

Regards
Bennie

@bamotav
Copy link
Owner

bamotav commented Nov 19, 2020

Hello @benniep, thanks for your proposal and for using this extension, but currently there is already a MongoDb storage extension, you can enter here.
Hangfire has a large number of extensions that you can check on this page
image

This extension uses an API that Hangfire provides which abstracts us from whatever storage you are using.
You can have the MongoDB storage and have my extension installed without problem.

@benniep
Copy link
Author

benniep commented Nov 19, 2020

Hi @bamotav,

I am alredy using Hangfire.Mongo but your extension only caters for storage that return IGlobalConfiguration like MSSQL Storage. I need a new overload in that class to return MongoStorage and not IGlobalConfiguration. You are not doing anything with IGlobalConfiguration you just return it. I need the same for Mongo.

I am willing to do the code change and contribute so that we can implement this extension for MongoDB users.

Regards
Bennie

@faliqulamin
Copy link

Hi,
Any update or solution for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants