Starts in:
0 DAY
13 HRS
57 MIN
28 SEC
Starts in:
0 D
13 H
57 M
28 S
Open Closed

Using Plugin Module Causes Background Jobs to Stop Working #6748


User avatar
0

Working on adding plugin modules, for handling logic specific to clients and I started seeing background jobs stop working suddenly (reverting to NullBackgroundJobManager).

Working on creating a repro repo.

  • ABP Framework version: v8.0.2
  • UI Type: MVC
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

Without changes, commenting out the options.PlugInSources.AddFolder line causes it to start working correctly again (though without the module being registered). Here's the code in which commenting it out makes it work again:

    await builder.AddApplicationAsync<CabMDWebModule>(options =>
    {
        // Hmm, works for now but what we want is a fixed location and if there are plugins, add them.
        var currentDirectory = options.Services.GetHostingEnvironment().ContentRootPath;
        var plugDllInPath = "";
        for (var i = 0; i < 10; i++)
        {
            var parentDirectory = new DirectoryInfo(currentDirectory).Parent;
            if (parentDirectory == null)
            {
                break;
            }
            if (parentDirectory.Name == "src")
            {
#if DEBUG
                plugDllInPath = Path.Combine(parentDirectory.FullName, "CabMD.ClientPlugIn.RMA", "bin", "Debug", "net8.0");
#else
            plugDllInPath = Path.Combine(parentDirectory.FullName, "CabMD.ClientPlugIn.RMA", "bin", "Release", "net8.0");
#endif
                break;
            }
            currentDirectory = parentDirectory.FullName;
        }

        if (Path.Exists(plugDllInPath))
        {
            // delete *.deps.json files before adding the folder as the dep file causes an error
            foreach (var depFile in Directory.GetFiles(plugDllInPath, "*.deps.json"))
            {
                File.Delete(depFile);
            }

            options.PlugInSources.AddFolder(plugDllInPath);
        }
    });

2 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Working on creating a repro repo.

    Thanks. liming.ma@volosoft.com

  • User Avatar
    0
    ServiceBot created
    Support Team Automatic process manager

    This question has been automatically marked as stale because it has not had recent activity.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06