Skip to content

Commit

Permalink
Merge pull request #323 from XePeleato/patch-1
Browse files Browse the repository at this point in the history
net: Add --no-timeout option to run process_submissions continuously
  • Loading branch information
dstndstn authored Dec 17, 2024
2 parents 3f5bd4f + a643eb8 commit 5338a7b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions net/process_submissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ def job_callback(result):


def main(dojob_nthreads, dosub_nthreads, refresh_rate, max_sub_retries,
solve_command, solve_locally):
solve_command, solve_locally, no_timeout):

print('Tempdir:', tempfile.gettempdir())

Expand Down Expand Up @@ -873,7 +873,7 @@ def main(dojob_nthreads, dosub_nthreads, refresh_rate, max_sub_retries,
print()

t_now = time.time() - t_start
quitnow = (t_now > maxtime)
quitnow = False if no_timeout else (t_now > maxtime)

#print('Checking for new Submissions')
newsubs = Submission.objects.filter(processing_started__isnull=True)
Expand Down Expand Up @@ -1088,7 +1088,10 @@ def main(dojob_nthreads, dosub_nthreads, refresh_rate, max_sub_retries,
parser.add_option('--solve-locally',
help='Command to run astrometry-engine on this machine, not via ssh')

parser.add_option('--no-timeout', action='store_true', default=False,
help='Do not exit after one day')

opt,args = parser.parse_args()

main(opt.jobthreads, opt.subthreads, opt.refreshrate, opt.maxsubretries,
opt.solve_command, opt.solve_locally)
opt.solve_command, opt.solve_locally, opt.no_timeout)

0 comments on commit 5338a7b

Please sign in to comment.