@dexmox: Your link... https://github.com/aspnetzero/aspnet-zero/issues/96#issuecomment-268093697 ...is broken. Error 404.
The job runs to completion (several minutes) and completes normally.
bool deleted = await _backgroundJobManager.DeleteAsync(backgroundJobId);
DeleteAsync returns true. The job is removed from AbpBackgroundJob table. Yet the background job continues to run Why? How can I stop the execution of a background job?
Abp v4.9.0 ANZ v7.2.3 Core/Angular Background jobs are not disabled. I use them in my app.
per ABP.NET Boilerplate documentation User token removal period the following code should remove expired tokens from the AbpUserTokens table within a minute of app startup if I understand correctly.
public override void PreInitialize()
{
Configuration.BackgroundJobs.CleanUserTokenPeriod = 1000 * 60 ; // 1 minute
}
However, the table contains hundreds of rows with ExpireDate more than a month old after the website has been running for more than 1 minute.
After upgrading Visual Studio Enterprise 2019 to version 16.3.5 and Visual Studio Code to version 1.39.2 the problem disappeared. I have no explanation of how or if upgrading VSs fixed the problem.
After a fresh rebuild of all app components (aspnet-core & angular), whenever I launch the Chrome browser at "localhost:4200" in Visual Studio Code debug, the following error always occurs. Refreshing the browser window will overcome the error and the app will show the login page per normal behavior. Subsequent restarts of the angular code from VS Code debug do not exhibit this error. Using ANZ Version 7.2.3
[WDS] Live Reloading enabled.
Angular is running in the development mode. Call enableProdMode() to enable the production mode.
null: ERROR
null: Error: Uncaught (in promise): ChunkLoadError: Loading chunk account-account-module failed.
message: "Uncaught (in promise): ChunkLoadError: Loading chunk account-account-module failed.
(error: http://localhost:4200/account-account-module.js)
ChunkLoadError: Loading chunk account-account-module failed.
(error: http://localhost:4200/account-account-module.js)
at Function.requireEnsure [as e] (http://localhost:4200/runtime.js:127:26)
at loadChildren (http://localhost:4200/main.js:27451:64)
at RouterConfigLoader.push../node_modules/@angular/router/fesm5/router.js.RouterConfigLoader.loadModuleFactory (http://localhost:4200/vendor.js:88907:39)
at RouterConfigLoader.push../node_modules/@angular/router/fesm5/router.js.RouterConfigLoader.load (http://localhost:4200/vendor.js:88892:35)
at MergeMapSubscriber.project (http://localhost:4200/vendor.js:87894:47)
at MergeMapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapSubscriber._tryNext (http://localhost:4200/vendor.js:216383:27)
at MergeMapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapSubscriber._next (http://localhost:4200/vendor.js:216373:18)
at MergeMapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (http://localhost:4200/vendor.js:211078:18)
at Observable._subscribe (http://localhost:4200/vendor.js:221743:24)
at Observable.push../node_modules/rxjs/_esm5/internal/Observable.js.Observable._trySubscribe (http://localhost:4200/vendor.js:210460:25)"
promise: ZoneAwarePromise {__zone_symbol__state: 0, __zone_symbol__value: ChunkLoadError: Loading chunk account-account-modu…}
rejection: ChunkLoadError: Loading chunk account-account-module failed.
stack: "Error: Uncaught (in promise): ChunkLoadError: Loading chunk account-account-module failed.
(error: http://localhost:4200/account-account-module.js)
ChunkLoadError: Loading chunk account-account-module failed.
(error: http://localhost:4200/account-account-module.js)
at Function.requireEnsure [as e] (http://localhost:4200/runtime.js:127:26)
at loadChildren (http://localhost:4200/main.js:27451:64)
at RouterConfigLoader.push../node_modules/@angular/router/fesm5/router.js.RouterConfigLoader.loadModuleFactory (http://localhost:4200/vendor.js:88907:39)
at RouterConfigLoader.push../node_modules/@angular/router/fesm5/router.js.RouterConfigLoader.load (http://localhost:4200/vendor.js:88892:35)
at MergeMapSubscriber.project (http://localhost:4200/vendor.js:87894:47)
at MergeMapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapSubscriber._tryNext (http://localhost:4200/vendor.js:216383:27)
at MergeMapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapSubscriber._next (http://localhost:4200/vendor.js:216373:18)
at MergeMapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (http://localhost:4200/vendor.js:211078:18)
at Observable._subscribe (http://localhost:4200/vendor.js:221743:24)
at Observable.push../node_modules/rxjs/_esm5/internal/Observable.js.Observable._trySubscribe (http://localhost:4200/vendor.js:210460:25)
at resolvePromise (http://localhost:4200/polyfills.js:10830:35)
at resolvePromise (http://localhost:4200/polyfills.js:10789:21)
at http://localhost:4200/polyfills.js:10891:21
at ZoneDelegate.invokeTask (http://localhost:4200/polyfills.js:10425:35)
at Object.onInvokeTask (http://localhost:4200/vendor.js:70268:33)
at ZoneDelegate.invokeTask (http://localhost:4200/polyfills.js:10424:40)
at Zone.runTask (http://localhost:4200/polyfills.js:10192:51)
at drainMicroTaskQueue (http://localhost:4200/polyfills.js:10605:39)
at ZoneTask.invokeTask [as invoke] (http://localhost:4200/polyfills.js:10511:25)
at invokeTask (http://localhost:4200/polyfills.js:11665:18)"
task: ZoneTask {_zone: Zone, runCount: 0, _zoneDelegates: null, …}
zone: Zone {_parent: Zone, _name: "angular", _properties: Object, …}
__proto__: Object {constructor: , name: "Error", message: "", …}
Your solution worked. Thank you!
ANZ version 7.2.3 Sent project link via email.