Long running processes prevent other processes from responding as quickly as intended. Typically a problem in UI programming, long running processes can prevent the UI from responding to user input.
Questions tagged [long-running-processes]
289 questions
75
votes
1 answer
Long running REST API with queues
We are implementing a REST API, which will kick off multiple long running backend tasks. I have been reading the RESTful Web Services Cookbook and the recommendation is to return HTTP 202 / Accepted with a Content-Location header pointing to the…

user2079172
- 927
- 1
- 9
- 8
26
votes
2 answers
What is correct way to combine long-running tasks with async / await pattern?
I have a "High-Precision" timer class that I need to be able to be start, stop & pause / resume. To do this, I'm tying together a couple of different examples I found on the internet, but I'm not sure if I'm using Tasks with asnyc / await…

Joshua Barker
- 987
- 2
- 11
- 23
17
votes
5 answers
Appropriate solution for long running computations in Azure App Service and .NET Core 3.1?
What is an appropriate solution for long running computations in Azure App Service and .NET Core 3.1 in an application that has no need for a database and no IO to anything outside of this application ? It is a computation task.
Specifically, the…

H2ONaCl
- 10,644
- 14
- 70
- 114
17
votes
4 answers
MySQL - can I limit the maximum time allowed for a query to run?
I'm looking for a way to limit the max running time of a query on mysql server. I figured this could be done through the my.cnf configuration file, but couldn't find anything relevant in the docs. Anyone knows if this could be done? thanks.

sa125
- 28,121
- 38
- 111
- 153
16
votes
4 answers
How to start a long-running process from a Django view?
I need to run a process that might take hours to complete from a Django view. I don't need to know the state or communicate with it but I need that view to redirect away right after starting the process.
I've tried using subprocess.Popen, using it…

excieve
- 566
- 5
- 6
16
votes
2 answers
Run arbitrary subprocesses on Windows and still terminate cleanly?
I have an application A that I would like to be able to invoke arbitrary other processes as specified by a user in a configuration file.
Batch script B is one such process a user would like to be invoked by A. B sets up some environment variables,…

Weeble
- 17,058
- 3
- 60
- 75
13
votes
2 answers
How to use Google Cloud PubSub and Run to handle resource-intensive long-running tasks?
I've got a Google Cloud PubSub topic which at times has thousands of messages and at times zero messages coming in. These messages represent tasks which can take upwards of an hour each. Preferably I'm able to use Cloud Run for this, as it scales…

thimo visser
- 155
- 2
- 7
12
votes
2 answers
Postgresql Check if query is still running
At my work, I needed to build a new join table in a postgresql database that involved doing a lot of computations on two existing tables. The process was supposed to take a long time so I set it up to run over the weekend before I left on Friday. …

Thomas
- 871
- 2
- 8
- 21
11
votes
4 answers
shell script to spawn processes, terminate children on SIGTERM
I want to write a shell script that spawns several long-running processes in the background, then hangs around. Upon receiving SIGTERM, I want all the subprocesses to terminate as well.
Basically, I want a "master process".
Here's what I got so…

itsadok
- 28,822
- 30
- 126
- 171
10
votes
2 answers
How to return 202 Accepted and then continue processing the request in Nest.js
I need a controller action that:
Authorizes the call
Validates it
Returns the 202 Accepted status
Continues processing the request
Makes a call to external API with the results of previously accepted and now processed request.
First two points…

Forseti
- 2,587
- 6
- 21
- 32
10
votes
1 answer
Force immediate DOM update modified with jQuery in long-running function
I have a javascript that takes about 2 seconds to execute (complex optimization algorithm).
I want to set certain span to "working..." at the beginning of the function.
I observe that the span doesn't change until the end of the function.
How can I…

THX-1138
- 21,316
- 26
- 96
- 160
10
votes
3 answers
Long running operations (threads) in a web (asp.net) environment
I have an asp.net (mvc) web site. As the part of the functions I will have to support some long running operations, for example:
Initiated from user:
User can upload (xml) file to the server. On the server I need to extract file, do some…

rrejc
- 2,682
- 3
- 26
- 33
9
votes
2 answers
Is it the correct implementation?
I am having a Windows Service that needs to pick the jobs from database and needs to process it.
Here, each job is a scanning process that would take approx 10 mins to complete.
I am very new to Task Parallel Library. I have implemented in the…

Sai Avinash
- 4,683
- 17
- 58
- 96
8
votes
3 answers
Can a Windows Service take hours to shutdown gracefully?
We have a .NET Windows service that shovels a lot of highly critical data from A to B in a transactional manner.
We also need to make sure that all external compontents used in the service are unallocated correctly and everything cleaned up before…

John
- 3,591
- 8
- 44
- 72
7
votes
5 answers
beginBackgroundTaskWithExpirationHandler calling endBackgroundTask but not ending process
I have some long running process which I want to run even if application goes in background. I am calling application's beginBackgroundTaskWithExpirationHandler: method and in the expirationBlock I am calling application's endBackgroundTask.
Here is…

Kapil Choubisa
- 5,152
- 9
- 65
- 100