Questions tagged [time-limiting]

128 questions
1
vote
0 answers

Setting time limit for getting requests response with try-except

My Python 3.8 script consumes an external REST API using requests, which is sometimes slow. How can I set a time limit to waiting for each response so that it just skips that request and treat that iteration as incomplete, preferably using…
amphibient
  • 29,770
  • 54
  • 146
  • 240
1
vote
1 answer

Timelimiter is not interrupting the thread

I am using resilience4j Timelimiter in my project. The timelimiter is throwing an error if a request is taking more than 10s, but it is not interrupting the thread. When call comes from postman, i have put the debug and tested, after 10s in postman…
Ganesh
  • 21
  • 2
1
vote
0 answers

How to send e-mail to multiple recipients without limit

I want to use php to send email to many e-mail addresses but: I want to make 30 seconds delay between every sent email I don't want limit to recipients list (my list is over 500 email) when I run the code it tells my time out after 30+ sent…
1
vote
1 answer

Time complexity exceeding while using "else-if" but works fine when using "If statement"

ques: Given an array of integers in increasing order, return an array containing positions(index+1) of two numbers that add up to a specific target number Sol: When I write the code without using else-if for checking second condition, then I get…
alpha-
  • 19
  • 4
1
vote
1 answer

Lifetime of a colab VM without GPU or TPU

I've read frequently (here, here and at tons of other places) that the VMs at google colab timeout after 12h. However, it's always about TPU and GPU accelerated VMs. What about not-hardware-accelerated ones? Is there a time limit? Is it also 12…
ecstrema
  • 543
  • 1
  • 5
  • 20
1
vote
2 answers

String sorting problem with code execution time limit

I was recently trying to solve a HackerEarth problem. The code worked on the sample inputs and some custom inputs that I gave. But, when I submitted, it showed errors for exceeding the time limit. Can someone explain how I can make the code run…
James Albert
  • 75
  • 2
  • 7
1
vote
2 answers

How can I allow a user to only access a view once every 30 minutes in Django?

I am building an app that lets users update a webpage, but I want to restrict any user from being able to make updates every 20-30 minutes. Would I be able to simply add this logic to a view definition? @login_required def update_options(request): …
1
vote
1 answer

Time Limit Exception on excercise about finding the largest area in matrix

https://judge.telerikacademy.com/problem/29largestareamatrix That's the exercise. Write a program that finds the largest area of equal neighbour elements in a rectangular matrix and prints its size. Input On the first line you will receive the…
user8549135
  • 59
  • 1
  • 10
1
vote
4 answers

Having a Print Statement Disappear after a Time Limit

I would like to know if it is possible to limit the amount of time a print statement appears in the user console. I have a project that is a Contact Manager and it used a CSV file to store the contact data. The program is designed to create a new…
1
vote
1 answer

Time limit imposed in command line does not seem to constraint run time

I am trying to run a MiniZinc model with a OSICBC solver via bash, with the following command-line arguments (subject to a time limit of 30000ms or 30s): minizinc --solver osicbc model.mzn data.dzn --time-limit 30000 --output-time But for just this…
Stoner
  • 846
  • 1
  • 10
  • 30
1
vote
1 answer

Xamarin Android: Will SyncAdapter ever expired during calling

In iOS, the background fetch has a limit of some period of time during the call of the background fetch. But in android, will the SyncAdapter have the time limit from executing, or will the syncing continue until it's finished.
LittleFunny
  • 8,155
  • 15
  • 87
  • 198
1
vote
0 answers

trying to submit a code on scorify but i get the time limit exceeded error

i'm new to competitive programming world and i came across a problem that tries to calculate the number of substrings of a big string that contains only digits . how ever when i try to run the program on scorify platform it gives me the…
N. younes
  • 101
  • 4
1
vote
2 answers

Google spreadsheet script time limit of execution

I've written gs script to clear data from all cells in sheets. Spreadsheet has a lot of sheets (about 200) and I get error of time limit execution. Maybe somebody have ideas how to resolve this issue. Here example of my code. function cleanAllOld()…
ysytnik
  • 15
  • 5
1
vote
2 answers

CPLEX time limit

I am using the IBM ILOG CPLEX Optimization Studio (version 12.6.3) to solve a large optimization problem. Since the problem is so big, CPLEX takes a very long time, so I want to limit the runtime. What is the correct syntax to limit…
Marijn
  • 21
  • 1
  • 3
1
vote
0 answers

Does systemd support time-limited daemon?

I have a daemon which runs for a pre-configured period of time and then quit. User can restart it if needed after that. It seems that systemd cannot handle this type of service. Below is the service file I tried. [Unit] # DaemonXXX…
He Jun
  • 131
  • 1
  • 8
1 2
3
8 9